Skip to content

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

Merged
merged 3 commits into from
Mar 18, 2020

Conversation

syg
Copy link
Contributor

@syg syg commented Mar 16, 2020

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 )

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.
Copy link
Member

@domenic domenic left a 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>
Copy link
Member

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.

Copy link
Contributor Author

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>?)

Copy link
Member

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.

@domenic domenic merged commit 203842a into whatwg:master Mar 18, 2020
@syg
Copy link
Contributor Author

syg commented Mar 18, 2020

Ah thanks for pushing the ids thing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants