mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(codegen): document.documentElement is null on early navigation (#33627)
This commit is contained in:
parent
e61cea597a
commit
c81504c5d6
@ -90,7 +90,8 @@ export class Highlight {
|
|||||||
}
|
}
|
||||||
|
|
||||||
install() {
|
install() {
|
||||||
if (!this._injectedScript.document.documentElement.contains(this._glassPaneElement))
|
// NOTE: document.documentElement can be null: https://github.com/microsoft/TypeScript/issues/50078
|
||||||
|
if (this._injectedScript.document.documentElement && !this._injectedScript.document.documentElement.contains(this._glassPaneElement))
|
||||||
this._injectedScript.document.documentElement.appendChild(this._glassPaneElement);
|
this._injectedScript.document.documentElement.appendChild(this._glassPaneElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user