-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Layering: Implement HostEnqueuePromiseJob #5360
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
The JavaScript specification now uses the HostEnqueuePromiseJob hook, to be implemented by embedders, for enqueuing promises with the host. This allows HTML to avoid its willful violation, and delete an explanation of the motivation for this violation.
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.
Great stuff! Only editorial nits.
@@ -91142,65 +91143,29 @@ document.querySelector("button").addEventListener("click", bound); | |||
user with a mechanism to just close the page entirely, without running any <code | |||
data-x="event-unload">unload</code> event handlers.</p> | |||
|
|||
<h5>Integration with the JavaScript job queue</h5> | |||
<h5><dfn>HostEnqueuePromiseJob</dfn>(<var>job</var>, <var>realm</var>)</h5> |
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.
We should preserve both of the old IDs. We do this manually by adding id=""
for one, and <span id=""></span>
for others. You can find some examples elsewhere in the spec.
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.
Sorry I'm not following, what old ids are you referring to? EnqueueJob? (Does this comment refer to the HostEnqueuePromiseJob <h5>
?)
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.
I meant the "integration with the JavaScript job queue" and "enqueue job" heading IDs.
I'll push a commit that does this.
Ah thanks for pushing the ids thing! |
The JavaScript specification now uses the HostEnqueuePromiseJob hook, to
be implemented by embedders, for enqueuing promises with the host. This
allows HTML to avoid its willful violation, and delete an explanation of
the motivation for this violation.
(This supersedes #4722. @littledan and I agreed I'll draft the upstream HTML PR. This PR is based off his; I'd use that PR but I don't have write access to his fork.)
/index.html ( diff )
/infrastructure.html ( diff )
/webappapis.html ( diff )