From 917c4f0cf344bbf0fde3e6eff33b45dfe86a74d6 Mon Sep 17 00:00:00 2001 From: gongshun <2440606146@qq.com> Date: Thu, 22 Oct 2020 14:50:30 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=81=20ie=20does=20not=20support=20docu?= =?UTF-8?q?ment.contains=20(#1016)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: gongshun --- src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index b4890c5..16df683 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -136,7 +136,7 @@ export function isEnableScopedCSS(sandbox: FrameworkConfiguration['sandbox']) { */ export function getXPathForElement(el: Node, document: Document): string | void { // not support that if el not existed in document yet(such as it not append to document before it mounted) - if (!document.contains(el)) { + if (!document.body.contains(el)) { return undefined; }