8000 [web-animations-2][css-animations-2] How do AnimationTriggers attach to animations? · Issue #12397 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[web-animations-2][css-animations-2] How do AnimationTriggers attach to animations? #12397
Open
@DavMila

Description

@DavMila

In #12119 we resolved to treat AnimationTriggers as "external controllers" of animations rather than an underlying mechanism for how animations play. With this model, we need an explicit way to associate AnimationTriggers with Animations. In #12119 We proposed AnimationTrigger.addAnimation(Animation) and AnimationTrigger.removeAnimation(animation).

I'm filing this issue separately as the main item in #12119 has been resolved on and that issue already has a pretty long thread.

Picking up from @flackr's suggestion, some possible options are:

  • AnimationTrigger.addAnimation(Animation)/AnimationTrigger.removeAnimation(animation) which follows the pattern of EventTarget.addEventListener,
  • AnimationTrigger.animations.add/AnimationTrigger.animations.remove which follows the pattern of Element.classList.

My preference would be for AnimationTrigger.addAnimation/AnimationTrigger.removeAnimation.

@flackr @ydaniv @bramus

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

      0