我正在使用angularjs创建一个项目。在我的项目中,我已经实现了SVG2Bitmap,除了IE之外,它在所有浏览器中都能正常工作。在官方文档中 https://github.com/Kaiido/SVG2Bitmap 说这在IE中得到支持。 这是我的代码:
SVG2Bitmap(this, function(canvas, dataURL) {
console.log("SVG2Bitmap")
canvas.id = "canvas_" + id;
canvasArr.push(canvas)
parent.replaceChild(canvas, thisData);
var image1, image2, image3,image4,image5 = null;
var p2 = new Promise(function (resolve, reject) {
html2canvas(html, {
onrendered: function(canvas) {
image1 = canvas.toDataURL();
resolve(image1)
}
});
});
})
object DOMException{ABORT_ERR: 20, code: 12, DATA_CLONE_ERR: 25, DOMSTRING_SIZE_ERR: 2, HIERARCHY_REQUEST_ERR: 3, INDEX_SIZE_ERR: 1, INUSE_ATTRIBUTE_ERR: 10, INVALID_ACCESS_ERR: 15, INVALID_CHARACTER_ERR: 5, INVALID_MODIFICATION_ERR: 13, INVALID_NODE_TYPE_ERR: 24, INVALID_STATE_ERR: 11, message: "SyntaxError", name: "SyntaxError", NAMESPACE_ERR: 14, NETWORK_ERR: 19, NO_DATA_ALLOWED_ERR: 6, NO_MODIFICATION_ALLOWED_ERR: 7, NOT_FOUND_ERR: 8, NOT_SUPPORTED_ERR: 9, PARSE_ERR: 81