1904labs / dom-to-image-more

Generates an image from a DOM node using HTML5 canvas

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can I use this library without npm or module? Just plain html

coisox opened this issue · comments

I include in index.html like this:
<script src="https://raw.githubusercontent.com/1904labs/dom-to-image-more/main/dist/dom-to-image-more.min.js"></script>

Then when I do this in script, I got error "domtoimage is not defined"
console.log(domtoimage)

I can't use "import" because "Cannot use import statement outside a module"

Yep, just include the minified source from a package cache like https://cdnjs.com/libraries/dom-to-image-more

Thank you it works. So any other library that ask me to import, I assume I cannot use them directly but need to find from CDNJS right?