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

"opener" setter says to return things, but setters can't return stuff #3904

Closed
bzbarsky opened this issue Aug 10, 2018 · 4 comments
Closed
Assignees
Labels
clarification Standard could be clearer

Comments

@bzbarsky
Copy link
Contributor

https://html.spec.whatwg.org/multipage/browsers.html#dom-opener setter step 2 says:

Return the result of calling OrdinaryDefineOwnProperty....

but it's a setter; it can't return anything.

@domenic
Copy link
Member

domenic commented Aug 10, 2018

This section is written in JavaScript style, where you return completion records (unless you use ! or ?). So if OrdinaryDefineOwnProperty returns an abrupt completion, this will too.

@bzbarsky
Copy link
Contributor Author

Hmm. That was totally non-obvious, but OK.

@bzbarsky
Copy link
Contributor Author

In particular, what does "rethrow any exceptions" mean, then? In a context where completion records are the return type there are no "exceptions".

@domenic
Copy link
Member

domenic commented Aug 10, 2018

Yeah, that's pretty silly, you're right. It's straddling two styles. Probably simplest to update to say "Perform" instead of "Return the result of calling".

@domenic domenic self-assigned this Aug 14, 2018
domenic added a commit that referenced this issue Aug 14, 2018
@domenic domenic added the clarification Standard could be clearer label Aug 14, 2018
domenic added a commit that referenced this issue Aug 15, 2018
mustaqahmed pushed a commit to mustaqahmed/html that referenced this issue Feb 15, 2019
mustaqahmed pushed a commit to mustaqahmed/html that referenced this issue Feb 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Standard could be clearer
Development

No branches or pull requests

2 participants