File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -575,6 +575,7 @@ export const getV2PluginAPIs = () => {
575575 'TextDecoder' ,
576576 'URL' ,
577577 'URLSearchParams' ,
578+ 'performance' ,
578579 ]
579580 for ( const key of keys ) {
580581 if ( allowedKeys . includes ( key ) ) {
@@ -608,6 +609,14 @@ export const getV2PluginAPIs = () => {
608609 //@ts -expect-error spreading any[] into clearTimeout - first arg should be number | undefined
609610 return globalThis . clearTimeout ( ...args ) ;
610611 }
612+ safeGlobal . requestAnimationFrame = ( ...args : any [ ] ) => {
613+ //@ts -expect-error spreading any[] into requestAnimationFrame - first arg should be FrameRequestCallback
614+ return globalThis . requestAnimationFrame ( ...args ) ;
615+ }
616+ safeGlobal . cancelAnimationFrame = ( ...args : any [ ] ) => {
617+ //@ts -expect-error spreading any[] into cancelAnimationFrame - first arg should be number
618+ return globalThis . cancelAnimationFrame ( ...args ) ;
619+ }
611620 safeGlobal . alert = globalThis . alert ;
612621 safeGlobal . confirm = globalThis . confirm ;
613622 safeGlobal . prompt = globalThis . prompt ;
You can’t perform that action at this time.
0 commit comments