This repository was archived by the owner on Feb 26, 2024. It is now read-only.
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
requestAnimationFrame should return native handleId or cancelAF should accept TimerOption #360
Closed
Description
From angular/angular#8401
Currently, zone-patched requestAnimationFrame
returns ZoneTask
.
It seems breaking native rAF canceling:
let handleId = requestAnimationFrame(fn);
cancelAnimationFrame(handleId); // not canceled
To cancel rAF, we have to use data.handleId
let timerOption = requestAnimationFrame(fn);
cancelAnimationFrame(timerOption.data.handleId);
Metadata
Metadata
Assignees
Labels
No labels