From 9c091c8f856813f6824a94a3ffb926cbde013e7d Mon Sep 17 00:00:00 2001 From: Jacob Wright Date: Tue, 24 Aug 2021 17:03:00 -0600 Subject: [PATCH] [fix] Fixes regression in iFrame animations caused by #6570 Which is funny, because #6570 was fixing a regression as well, to do with detached dom nodes. --- src/runtime/internal/dom.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts index 98adc99b59..2aef1c7f28 100644 --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -151,7 +151,7 @@ export function get_root_for_style(node: Node): ShadowRoot | Document { if ((root as ShadowRoot).host) { return root as ShadowRoot; } - return document; + return node.ownerDocument; } export function append_empty_stylesheet(node: Node) {