html2canvas(...).then is not a function
See original GitHub issuevar poster = document.querySelector('#poster'); poster.onclick = function() { html2canvas(msgImage).then(canvas => { var dataUrl = canvas.toDataURL('image/jpeg', 0.9); console.log(canvas, '[canvas]'); shareImage.src = dataUrl; generate.style.display = "block"; }); }
Click the button in the test environment is normal, but the official environment error, suggesting that “html2canvas (…). Then is not a function”
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
html2canvas not working at all - Stack Overflow
Basically I'm allowing the user to edit some text in the div and then display its screenshot. Can someone please tell why is...
Read more >TypeError: $(...).html2canvas is not a function - Drupal
Hi, I found TypeError: $(...).html2canvas is not a function while using html2canvas function in my custom jquery.
Read more >How to use the html2canvas function in html2canvas - Snyk
To help you get started, we've selected a few html2canvas examples, ... const printElement = element => { html2canvas(element).then(function (canvas) ...
Read more >html2canvas - Screenshots with JavaScript
Try out html2canvas. Test out html2canvas by rendering the viewport from the current page. Capture.
Read more >Html2canvas Error : Uncaught TypeError: undefined is not a ...
Html2canvas Error : Uncaught TypeError: undefined is not a function ... I have used the below code to generate the screenshot of a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
function Export() { alert("Hello! I am an alert box!! "); var element = document.getElementById(“page”);
https://github.com/niklasvh/html2canvas/releases/tag/v1.0.0-alpha.8 is the latest version