SVG in <img> breaks export in IE11
See original GitHub issueExporting <img src='some_image.svg'>
element with SVG content using IE11 ends with error:
TypeError: Unable to get property 'svg' of undefined or null reference at SVGContainer.prototype.hasFabric (http://10.0.2.2:9000/lib/html2canvas/dist/html2canvas.js:3214:5) at SVGContainer (http://10.0.2.2:9000/lib/html2canvas/dist/html2canvas.js:3204:5) at ImageLoader.prototype.loadImage (http://10.0.2.2:9000/lib/html2canvas/dist/html2canvas.js:1291:13) at Anonymous function (http://10.0.2.2:9000/lib/html2canvas/dist/html2canvas.js:1276:17) at Anonymous function (http://10.0.2.2:9000/lib/html2canvas/dist/html2canvas.js:1274:9) at ImageLoader.prototype.findImages (http://10.0.2.2:9000/lib/html2canvas/dist/html2canvas.js:1248:5) at ImageLoader.prototype.fetch (http://10.0.2.2:9000/lib/html2canvas/dist/html2canvas.js:1354:5) at NodeParser (http://10.0.2.2:9000/lib/html2canvas/dist/html2canvas.js:1841:5) at renderWindow (http://10.0.2.2:9000/lib/html2canvas/dist/html2canvas.js:992:5) at Anonymous function (http://10.0.2.2:9000/lib/html2canvas/dist/html2canvas.js:979:13)
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:5
Top GitHub Comments
Also see #834 window.html2canvas is undefined if a module loader is used, this sounds very familiar.
Possible fix: https://github.com/niklasvh/html2canvas/issues/834 Need ran into another error, so don’t quite know if it works, but I no longer get the svg error.