Skip to content
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
@lacolaco

Description

@lacolaco

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions