recently I want to make a simple web page recording .
idea: convert html to picture , every 50ms a picture, finally picture into animation , but encounter a problem.
how do I convert html text to a picture?
html2canvas parameters can be passed to dom node but not html text. Try to parse html text into dom, but an error will be reported. ownerDocument.defaultView is null. If you copy dom, an error of clone.js will be reported in html2canvas.
//html2canvas
var ownerDocument = element.ownerDocument;
if (!ownerDocument) {
return Promise.reject("Provided element is not within a Document");
}
var defaultView = ownerDocument.defaultView;
how to solve this problem if you continue to use html2canvas, or is there a recommendation from other third-party plug-ins?