We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
document
getRootNode
1 parent a92dd7b commit 65421bbCopy full SHA for 65421bb
src/platforms/platform.dom.js
@@ -339,7 +339,7 @@ module.exports = {
339
// If the canvas is in a shadow DOM, then the styles must also be inserted
340
// into the same shadow DOM.
341
// https://github.com/chartjs/Chart.js/issues/5763
342
- var root = canvas.getRootNode();
+ var root = canvas.getRootNode ? canvas.getRootNode() : document;
343
var targetNode = root.host ? root : document.head;
344
injectCSS(targetNode, stylesheet);
345
}
0 commit comments