我将html2canvas作为常规脚本进行了测试,它似乎工作得很好。现在我想使用npm-package,它看起来非常不合作。换句话说,它不会做任何事情,或者永远不会触发then-function。
安装包: v0.5.0-alpha2
有什么好主意吗?
var html2canvas = require('html2canvas');
html2canvas(document.body).then(function(canvas) {
debugger;
document.body.appendChild(canvas);
});
发布于 2015-10-01 17:04:39
尝尝这个
var html2canvas = require('html2canvas');
window.html2canvas = html2canvas;
html2canvas(document.body)
.then(function(canvas) {
debugger;
});https://stackoverflow.com/questions/32094094
复制相似问题