Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
stephenmcgruer opened this issue Apr 11, 2018 · 0 comments

Comments

@stephenmcgruer
Copy link
Contributor

(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."

fergald pushed a commit to fergald/csswg-drafts that referenced this issue May 7, 2018
This brings the spec's handling of dictionary objects into line with
WebIDL which has:

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

[1] https://heycam.github.io/webidl/#es-dictionary

Closes w3c#2533.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants