chore: remove redundant check for highlight liveness (#28108)

Closes https://github.com/microsoft/playwright/issues/28002
This commit is contained in:
Pavel Feldman 2023-11-13 11:44:25 -08:00 committed by GitHub
parent db38f0d2df
commit cd70d51aa8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 7 deletions

View file

@ -96,10 +96,6 @@ export class Highlight {
this._glassPaneElement.remove();
}
isInstalled(): boolean {
return this._glassPaneElement.parentElement === this._injectedScript.document.documentElement && !this._glassPaneElement.nextElementSibling;
}
showActionPoint(x: number, y: number) {
this._actionPointElement.style.top = y + 'px';
this._actionPointElement.style.left = x + 'px';

View file

@ -842,9 +842,6 @@ export class Recorder {
}
installListeners() {
// Ensure we are attached to the current document, and we are on top (last element);
if (this.highlight.isInstalled())
return;
removeEventListeners(this._listeners);
this._listeners = [
addEventListener(this.document, 'click', event => this._onClick(event as MouseEvent), true),