mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
feat(highlight): update highlight from raf (#11443)
This commit is contained in:
parent
4a1f945a3b
commit
815e121445
@ -863,7 +863,13 @@ export class InjectedScript {
|
||||
this._highlight = new Highlight(false);
|
||||
this._highlight.install();
|
||||
}
|
||||
this._highlight.updateHighlight(this.querySelectorAll(selector, document.documentElement), stringifySelector(selector), false);
|
||||
this._runHighlightOnRaf(selector);
|
||||
}
|
||||
|
||||
_runHighlightOnRaf(selector: ParsedSelector) {
|
||||
if (this._highlight)
|
||||
this._highlight.updateHighlight(this.querySelectorAll(selector, document.documentElement), stringifySelector(selector), false);
|
||||
requestAnimationFrame(() => this._runHighlightOnRaf(selector));
|
||||
}
|
||||
|
||||
hideHighlight() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user