🏁 ie does not support document.contains (#1016)
Co-authored-by: gongshun <gongshun@gridsum.com>
This commit is contained in:
parent
6f12329b41
commit
917c4f0cf3
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user