Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit fcf187c

Browse files
JiaLiPassionmhevery
authored andcommitted
fix(module): fix #875, can disable requestAnimationFrame (#876)
1 parent 7ee8bcd commit fcf187c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Diff for: MODULE.md

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Below is the full list of current support modules.
3434
|--|--|--|
3535
|on_property|target.onProp will become zone aware target.addEventListener(prop)|__Zone_disable_on_property = true|
3636
|timers|setTimeout/setInterval/setImmediate will be patched as Zone MacroTask|__Zone_disable_timer = true|
37+
|requestAnimationFrame|requestAnimationFrame will be patched as Zone MacroTask|__Zone_disable_requestAnimationFrame = true|
3738
|blocking|alert/prompt/confirm will be patched as Zone.run|__Zone_disable_blocking = true|
3839
|EventTarget|target.addEventListener will be patched as Zone aware EventTask|__Zone_disable_EventTarget = true|
3940
|IE BrowserTools check|in IE, browser tool will not use zone patched eventListener|__Zone_disable_IE_check = true|

Diff for: lib/browser/browser.ts

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ Zone.__load_patch('timers', (global: any, Zone: ZoneType, api: _ZonePrivate) =>
2525
patchTimer(global, set, clear, 'Timeout');
2626
patchTimer(global, set, clear, 'Interval');
2727
patchTimer(global, set, clear, 'Immediate');
28+
});
29+
30+
Zone.__load_patch('requestAnimationFrame', (global: any, Zone: ZoneType, api: _ZonePrivate) => {
2831
patchTimer(global, 'request', 'cancel', 'AnimationFrame');
2932
patchTimer(global, 'mozRequest', 'mozCancel', 'AnimationFrame');
3033
patchTimer(global, 'webkitRequest', 'webkitCancel', 'AnimationFrame');

0 commit comments

Comments
 (0)