Skip to content

[css-animationworklet] Passing DocumentTimeline via options: "object could not be cloned." #977

Closed
@mattgperry

Description

@mattgperry

In the Spring Sticky demo, the Animation Worklet is being passed new DocumentTimeline() as an option.

The spec says animation options should be serialisable. The live demo only works because the polyfill doesn't adhere to specs. Trying to pass new DocumentTimeline() to an Animation Worklet throws the error DOMException: Failed to construct 'WorkletAnimation': DocumentTimeline object could not be cloned..

Is this something that the API should support? If not, how could the Spring Sticky possibly be implemented with the API as specced?

As an aside the technique used within the Spring Sticky where the animator can detach from the main timeline would solve issues around animations (like a spring) not being able to stop themselves.

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