1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-03 02:37:21 +02:00

Use requestIdleCallback() in href-sanitizer scriptlet

Instead of requestAnimationFrame().
This commit is contained in:
Raymond Hill 2024-02-17 12:53:57 -05:00
parent 4af57e3e60
commit 33749d2d3f
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -3455,7 +3455,7 @@ function hrefSanitizer(
if ( shouldSanitize ) { break; }
}
if ( shouldSanitize === false ) { return; }
timer = self.requestAnimationFrame(( ) => {
timer = self.requestIdleCallback(( ) => {
timer = undefined;
sanitize();
});