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

Use current settings object instead of relevant settings object #46

Closed
zcorpan opened this issue May 15, 2023 · 4 comments
Closed

Use current settings object instead of relevant settings object #46

zcorpan opened this issue May 15, 2023 · 4 comments
Labels
clarification Standard could be clearer

Comments

@zcorpan
Copy link
Member

zcorpan commented May 15, 2023

https://websockets.spec.whatwg.org/#dom-websocket-websocket says

Let client be this's relevant settings object.

client is used for base URL for parsing relative URLs. This was introduced in #45

I think "relevant" should be "current". See web-platform-tests/wpt#39978 (comment)

WebSocket spec says to use the relevant settings object, but going by the example in https://html.spec.whatwg.org/multipage/webappapis.html#realms-settings-objects-global-objects there's no way to test for the relevant settings object for a constructor (vs a method), since you can't use .call() with a constructor.

I used current instead, like Workers, but this needs a spec change.

@domenic
Copy link
Member

domenic commented May 16, 2023

Inside constructors, "this's relevant settings object" === "current settings object", because of how "this" is constructed. So both are correct.

@zcorpan
Copy link
Member Author

zcorpan commented May 16, 2023

OK. Can we have a note to that effect?

@zcorpan zcorpan added the clarification Standard could be clearer label May 16, 2023
@domenic
Copy link
Member

domenic commented May 16, 2023

I'm not sure we need to add that to every spec that uses constructors, but maybe we could add it around https://html.spec.whatwg.org/#concept-relevant-everything ?

@zcorpan
Copy link
Member Author

zcorpan commented May 16, 2023

Yeah, good point. I'll open an issue for html.

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