Skip to content
This repository was archived by the owner on Jun 7, 2018. It is now read-only.
This repository was archived by the owner on Jun 7, 2018. It is now read-only.

Don't reject promises to signal cancellation #141

@jakearchibald

Description

@jakearchibald

https://w3c.github.io/web-animations/#canceling-an-animation-section

Just got caught out by this. An animation being stopped before completion doesn't feel like an exceptional state, certainly not something that should appear as an error in devtools.

This is a good usecase for cancelable promises https://github.com/domenic/cancelable-promise (+@domenic).

Alternatively, the promise could be .done rather than .finished and resolve to a value indicating whether the animation played to completion.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions