Skip to content

Commit

Permalink
fix(core): 🐛 use mw.requestIdleCallback for polyfill
Browse files Browse the repository at this point in the history
Safari does not support rIC yet and MW has a polyfill for that.
  • Loading branch information
alistair3149 committed Nov 17, 2024
1 parent a5b536d commit daef66f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions resources/skins.citizen.scripts/skin.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ function main( window ) {
}

// Defer non-essential tasks
// eslint-disable-next-line compat/compat
requestIdleCallback( deferredTasks, { timeout: 3000 } );
mw.requestIdleCallback( deferredTasks, { timeout: 3000 } );
}

if ( document.readyState === 'interactive' || document.readyState === 'complete' ) {
Expand Down

0 comments on commit daef66f

Please sign in to comment.