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

Remove "abort these steps" wording #2878

Closed
domenic opened this issue Aug 1, 2017 · 6 comments
Closed

Remove "abort these steps" wording #2878

domenic opened this issue Aug 1, 2017 · 6 comments
Labels
clarification Standard could be clearer good first issue Ideal for someone new to a WHATWG standard or software project

Comments

@domenic
Copy link
Member

domenic commented Aug 1, 2017

In Infra, we have clarified that "return" or "throw" aborts the algorithm it is in. This convention was adopted after much of the prose in the HTML Standard was written, so HTML contains many now-redundant sequences like

then return null and abort these steps

or

then throw a TypeError and abort these steps.

These should remove the redundant "and abort these steps". Similarly, cases like

Otherwise, if the new value is the same as the body element, do nothing. Abort these steps.

should be converted to replace "Abort these steps" with "Return".

Doing so helps set a good example, and reduce confusion for people who read HTML (which is currently a mix of the new style and the old style).

There are currently 427 instances of "abort these steps". If any of them seem tricky, feel free to leave them in and we can take care of them later. Just getting the straightforward ones is a big enough task.

(This is part of #2053)

@domenic domenic added clarification Standard could be clearer good first issue Ideal for someone new to a WHATWG standard or software project labels Aug 1, 2017
@sam0410
Copy link
Contributor

sam0410 commented Oct 18, 2017

Hi @domenic, I added a PR for this #3140. Please review.

@domenic
Copy link
Member Author

domenic commented Nov 14, 2017

Progress! After 7ebc44a, many of these are gone. 71 remain, and some of them are legitimate, e.g. they occur inside "in parallel" steps (for which return/throw don't work).

But others should be replaced, e.g. the one in drawImage() or the ImageData constructor. (ImageData even has a "throw an ... and return"; we should remove the "and return".) So there's still some work to do here.

@shreyateeza
Copy link
Member

Hello! I would like to work on this issue. @domenic

@domenic
Copy link
Member Author

domenic commented Dec 18, 2017

Great! Check out https://github.com/whatwg/html/blob/master/CONTRIBUTING.md to get set up. Then, try to find all instances of "abort these steps" and replace them with "return". Some of them need to stay "abort these steps", but we can point those out when you get to them.

@shreyateeza
Copy link
Member

@domenic Please assign me for this issue.

@domenic
Copy link
Member Author

domenic commented Dec 18, 2017

@shreyateeza GitHub doesn't let me do that, but no fear, you've stated this issue is yours; nobody else will take it :). You can work on it without being assigned.

shreyateeza added a commit to shreyateeza/html that referenced this issue Dec 19, 2017
shreyateeza added a commit to shreyateeza/html that referenced this issue Dec 20, 2017
shreyateeza added a commit to shreyateeza/html that referenced this issue Dec 22, 2017
shreyateeza added a commit to shreyateeza/html that referenced this issue Dec 22, 2017
shreyateeza added a commit to shreyateeza/html that referenced this issue Dec 22, 2017
domenic pushed a commit to shreyateeza/html that referenced this issue Jan 2, 2018
annevk pushed a commit that referenced this issue Jan 9, 2018
This replaces "abort these steps" with "return" and removes redundant "abort these steps".

Closes #2878.
alice pushed a commit to alice/html that referenced this issue Jan 8, 2019
alice pushed a commit to alice/html that referenced this issue Jan 8, 2019
This replaces "abort these steps" with "return" and removes redundant "abort these steps".

Closes whatwg#2878.
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
Development

No branches or pull requests

3 participants