-
Notifications
You must be signed in to change notification settings - Fork 24
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
Promise-manipulation shorthands have underdefined behavior #52
Comments
I think I mentioned this somewhere as a reason that this guide basically cannot be used directly by specifications. @tobie or someone else should take the time to integrate it into IDL as only IDL-derived specifications will be in need of this kind of language. |
Another issue is that people often want to use them on Web IDL objects, which are realm-agnostic. But we need to call the ES-spec algorithms with JS objects, which are not. So we need a specific global in which to do the conversion from IDL object -> JS object conversion. I was going to say that this should be the global of the promise by default, to save people typing. But then I remembered that promises, as ES spec objects, don't have associated globals. So that's fun. |
Web IDL objects are not realm-agnostic, if you mean platform objects. https://heycam.github.io/webidl/#es-platform-objects says:
and conversion to an ES object creates an ES object in that global (though this last part should probably be more clearly specified). Now if you try to pass and IDL dictionary in, then you have a problem. |
Good point, I got confused because my first example was a sequence of strings. I'll work to rephrase whatwg/html#2774. |
Right, sequences have the same problem as dictionaries... |
Fixed by whatwg/webidl#490! |
https://www.w3.org/2001/tag/doc/promises-guide#shorthand-manipulating says:
But to queue a task you need to know the event loop and the task queue to use. Which task queue is used here?
The text was updated successfully, but these errors were encountered: