Encountered when using html2canvas: DOMException: Failed to set the 'adoptedStyleSheets' property on 'ShadowRoot': Sharing constructed stylesheets in multiple documents is not allowed
html2canvas(document.getElementById('qr-code-content'), {useCORS: true}).then(canvas => {
document.getElementById('qr-code-content').append(canvas);
this.base64ImgData = canvas.toDataURL();
this.sharing = true;
});
This PR address the issue. https://github.com/niklasvh/html2canvas/pull/2020
You can use the fork if you need a quick solution or wait until it gets merged and get it from the main repo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With