html2canvas code not working IE 11

后端 未结 2 679
后悔当初
后悔当初 2020-12-21 08:34

I am hoping to use the html2canvas library to make a image of one div and put it in another. So far I have it working wonderfully in Safari, Chrome, and Firefox but not IE (

相关标签:
2条回答
  • 2020-12-21 09:17

    Add this 2 JS - It will automatically provides/replaces Promise if missing or broken.

    <script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.min.js"></script> 
    

    Source: Comment by Arthez on Roman Canlas's post & https://github.com/stefanpenner/es6-promise

    0 讨论(0)
  • 2020-12-21 09:18

    The appendChild function has nothing to do with the issue you're facing. appendChild has been supported ever since IE6+

    By looking at the html2canvas code, the library happens to make use of the Promises feature which unfortunately is not being supported in any version of IE

    http://caniuse.com/#search=promises

    (though it is supported in Microsoft Edge)

    0 讨论(0)
提交回复
热议问题