You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, the definition of throw doesn't make it obviously clear to the reader, who may not know WebIDL very well, that the binding layer will automatically handle the "throw" as a promise rejection.
I wonder if it might be helpful to write a note to describe this behavior and some examples? I've personally experienced issues with spec reviewers being confused if an operation is actually going to throw an exception and not return a rejected promise (just due to this behavior being a bit "magical").
At the same time, it is nice that we have the very clear "return a promise rejected with" to fall back on.
The text was updated successfully, but these errors were encountered:
(little bit of a rehash of #214)
As part of feedback for this Screen Orientation spec pull request:
https://github.com/w3c/screen-orientation/pull/251/files#r1180457386
There is a promise-returning operation (
.lock()
). In that context,@annevk correctly pointed out that I could simply write something like:And have the IDL binding layer do the right thing, as it knows that the operation returns a promise.
However, the definition of throw doesn't make it obviously clear to the reader, who may not know WebIDL very well, that the binding layer will automatically handle the "throw" as a promise rejection.
I wonder if it might be helpful to write a note to describe this behavior and some examples? I've personally experienced issues with spec reviewers being confused if an operation is actually going to throw an exception and not return a rejected promise (just due to this behavior being a bit "magical").
At the same time, it is nice that we have the very clear "return a promise rejected with" to fall back on.
The text was updated successfully, but these errors were encountered: