diff --git a/MODULE.md b/MODULE.md index d8d18045f..cc35d39f2 100644 --- a/MODULE.md +++ b/MODULE.md @@ -34,6 +34,7 @@ Below is the full list of current support modules. |--|--|--| |on_property|target.onProp will become zone aware target.addEventListener(prop)|__Zone_disable_on_property = true| |timers|setTimeout/setInterval/setImmediate will be patched as Zone MacroTask|__Zone_disable_timer = true| +|requestAnimationFrame|requestAnimationFrame will be patched as Zone MacroTask|__Zone_disable_requestAnimationFrame = true| |blocking|alert/prompt/confirm will be patched as Zone.run|__Zone_disable_blocking = true| |EventTarget|target.addEventListener will be patched as Zone aware EventTask|__Zone_disable_EventTarget = true| |IE BrowserTools check|in IE, browser tool will not use zone patched eventListener|__Zone_disable_IE_check = true| diff --git a/lib/browser/browser.ts b/lib/browser/browser.ts index e145c560a..c87041454 100644 --- a/lib/browser/browser.ts +++ b/lib/browser/browser.ts @@ -25,6 +25,9 @@ Zone.__load_patch('timers', (global: any, Zone: ZoneType, api: _ZonePrivate) => patchTimer(global, set, clear, 'Timeout'); patchTimer(global, set, clear, 'Interval'); patchTimer(global, set, clear, 'Immediate'); +}); + +Zone.__load_patch('requestAnimationFrame', (global: any, Zone: ZoneType, api: _ZonePrivate) => { patchTimer(global, 'request', 'cancel', 'AnimationFrame'); patchTimer(global, 'mozRequest', 'mozCancel', 'AnimationFrame'); patchTimer(global, 'webkitRequest', 'webkitCancel', 'AnimationFrame');