Skip to content
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

Update all "queue a task" invocations to explicitly specify their task source #4506

Open
domenic opened this issue Apr 5, 2019 · 3 comments
Labels
clarification Standard could be clearer good first issue Ideal for someone new to a WHATWG standard or software project topic: event loop

Comments

@domenic
Copy link
Member

domenic commented Apr 5, 2019

The spec currently is not very precise about how you specify the task source when queuing the task. Lots of parts of the spec do so via nearby sentences such as

The task source for the tasks mentioned above is the DOM manipulation task source

or

The task source for the tasks queued by algorithms in this section is the DOM manipulation task source.

or even

Queue a task to run the iframe load event steps.

The task source for this task is the DOM manipulation task source.

The way in which you have to search around to find the actual task source is frustrating and has led to some confusion in the past. (TODO citation needed.)

#4465 proposes that we explicitly use "Queue a task on the X task source to ..." from now on. This issue tracks updating the rest of the spec to do so, once that lands.


I am tagging this as "good first issue", and help would be appreciated working through it. Once #4465 lands, the work here should consist of:

  • Finding all instances of "queue a task" in the spec. This can be done by going to https://html.spec.whatwg.org/#queue-a-task and clicking on the <dfn> to see a popup listing everywhere that uses it.
  • Updating all of them to be of the form "queue a task on the X task source". To figure out X, search nearby for statements like the ones I listed above. (Some may already be of this form.)
  • Delete those now-redundant statements.

If someone wants to work on this, I suggest they first try it on one or two sections, then send a pull request, and we can make sure the process works out. Then you can unleash yourself on the rest of the spec :).

@domenic domenic added clarification Standard could be clearer topic: event loop labels Apr 5, 2019
@domenic domenic added the good first issue Ideal for someone new to a WHATWG standard or software project label Apr 5, 2019
domenic added a commit that referenced this issue Apr 26, 2019
@gterzian
Copy link
Member

gterzian commented May 3, 2019

The way in which you have to search around to find the actual task source is frustrating and has led to some confusion in the past. (TODO citation needed.)

A citation from a personal experience:

  1. The whatwg/html/ issue: When to "fail the connection" of an EventSource? #3789
  2. The implementation side: Aborting a document shoud only cancel tasks from the networking task source servo/servo#21114

@domenic
Copy link
Member Author

domenic commented May 3, 2019

Note that #4465 has landed, so if anyone wants to take on this issue, the groundwork is ready :)

@littledan
Copy link
Contributor

littledan commented May 15, 2019

Do you have a recommendation for how to define infrequently used or single-use task sources? In PRs I am working on, I am using the new "on the..." wording, but maintain those redundant statements to define the task source in the section. See #4613 (comment) and #4571.

Should I put a <dfn> around the first usage? Or define all these infrequently used task sources with the frequently used others above? Something else?

Edit: @TimothyGu pointed out that there are multiple precedents to the inline dfn wording, so I will go with that.

domenic pushed a commit that referenced this issue Dec 19, 2019
domenic added a commit that referenced this issue Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Standard could be clearer good first issue Ideal for someone new to a WHATWG standard or software project topic: event loop
Development

No branches or pull requests

3 participants