Skip to content

[web-animations-1] Don't throw for custom iterator that return null/undefined #2533

@stephenmcgruer

Description

@stephenmcgruer

(From discussion on web-platform-tests/wpt#10399)

Currently the procedure to process a keyframes argument (https://drafts.csswg.org/web-animations-1/#processing-a-keyframes-argument) says:

(in the otherwise case)
5.4.6 "If nextItem is not an object, throw a TypeError and abort these steps."

However in the above linked PR, Brian noted:

"Yeah, it looks like we shouldn't throw on null / undefined.

In WebIDL when we create a sequence from an iterable we have the step:

  1. Initialize Si to the result of converting nextItem to an IDL value of type T.

For converting dictionary types we have:

  1. If Type(V) is not Undefined, Null or Object, then throw a TypeError.

So we should update the Web Animations spec to match this and add a test for this case that we don't throw."

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