Skip to content

Commit

Permalink
Use requestIdleCallback() in href-sanitizer scriptlet
Browse files Browse the repository at this point in the history
Instead of requestAnimationFrame().
  • Loading branch information
gorhill committed Feb 17, 2024
1 parent 4af57e3 commit 33749d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/resources/scriptlets.js
Expand Up @@ -3455,7 +3455,7 @@ function hrefSanitizer(
if ( shouldSanitize ) { break; }
}
if ( shouldSanitize === false ) { return; }
timer = self.requestAnimationFrame(( ) => {
timer = self.requestIdleCallback(( ) => {
timer = undefined;
sanitize();
});
Expand Down

0 comments on commit 33749d2

Please sign in to comment.