fix(player): fix vroot context getter

This commit is contained in:
nick-delirium 2023-04-20 09:21:37 +02:00
parent fdbf1c2b86
commit cebb80c64b

View file

@ -315,7 +315,7 @@ export class OnloadStyleSheet extends PromiseQueue<CSSStyleSheet> {
return new OnloadStyleSheet(new Promise((resolve, reject) =>
vRoot.onNode(node => {
let context: typeof globalThis | null
if (node instanceof Document) {
if (node instanceof Document || node.nodeName === '#document') {
context = node.defaultView
} else {
context = node.ownerDocument.defaultView