mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 02:31:34 +08:00
feat(DomController): add DomController provider using stencil queue
This commit is contained in:
File diff suppressed because one or more lines are too long
@ -13,8 +13,15 @@ export class DomController {
|
||||
}
|
||||
|
||||
function getQueue() {
|
||||
const ionic = (window as any).Ionic;
|
||||
return ionic.queue;
|
||||
const Ionic = (window as any).Ionic;
|
||||
if (Ionic && Ionic.queue) {
|
||||
return Ionic.queue;
|
||||
}
|
||||
|
||||
return {
|
||||
read: (cb: any) => window.requestAnimationFrame(cb),
|
||||
write: (cb: any) => window.requestAnimationFrame(cb)
|
||||
};
|
||||
}
|
||||
|
||||
export type RafCallback = { (timeStamp?: number): void };
|
||||
|
Reference in New Issue
Block a user