-
Notifications
You must be signed in to change notification settings - Fork 172
Return rejected promise when the document is not fully active, for operations returning promises. #2210
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
Conversation
|
I'd like to review this. |
rtoy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm for the change.
But not sure what's up with bikeshed. In PR #2211, I've updated the expected results to match what I get locally, but Travis doesn't like it.
hoch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM % 2 questions
| thread:</span> | ||
|
|
||
| 1. Let <var>promise</var> be a new Promise. | ||
| 1. If [=this=]'s [=relevant global object=]'s [=associated Document=] is not [=fully active=] then return [=a promise rejected with=] "{{InvalidStateError}}" {{DOMException}}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's [=this=] here? I am assuming it is the parent BaseAudioContext, but the link "this" leads to an abstract description of this in WebIDL. I hope there's a better way to express the association.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a Document is not fully active, where does a "rejected promise" go? Or is this some sort of formality defined somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The [=something=] notation refers to exported definitions that are globally exposed. I would have expected some sort of name-spacing per spec, but I don't know how to do it and haven't found anything.
When describing a method, this is the object on which the method has been called, I think it's clear enough.
When a document is not fully active, the promise is returned rejected, and it goes wherever the author of the code wants it to go.
…erations returning promises.
Probably a change in format for the errors. I've updated those based on |
|
Thanks for the explanation. Still LGTM. |
Essentially a conversion to bikeshed of @domenic's comment and then used everywhere we create a promise.
Preview | Diff