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 994fe71 commit 09bd524Copy full SHA for 09bd524
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