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

Correct the type of opener in Window object idl block description #8263

Closed
gihyeonsung opened this issue Sep 5, 2022 · 5 comments
Closed

Comments

@gihyeonsung
Copy link

I think we should correct the type of attribute opener from any to WindowProxy? since the current idl block is not describing the type of its definition concretely.

The opener getter steps are:

  1. Let current be this's browsing context.

  2. If current is null, then return null.

  3. If current's disowned is true, then return null.

  4. If current's opener browsing context is null, then return null.

  5. Return current's opener browsing context's WindowProxy object.

The opener setter steps are:

  1. If the given value is null and this's browsing context is non-null, then set this's browsing context's disowned to true.

2 .If the given value is non-null, then return ? OrdinaryDefineOwnProperty(this, "opener", { [[Value]]: the given value, [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true }).

@saschanaz
Copy link
Member

saschanaz commented Oct 23, 2022

Oh, actually both WebKit and Blink has a custom setter behavior where random things are allowed to be assigned. Probably too dangerous to change that then.

@mathe42
Copy link

mathe42 commented Oct 23, 2022

Note that there is https://github.com/web-platform-tests/wpt/blob/master/html/browsers/windows/auxiliary-browsing-contexts/resources/opener-setter.html an explicit test to check if you can set it to a string,

@domenic
Copy link
Member

domenic commented Oct 23, 2022

WindowProxy is not a defined IDL type, so while implementations may use it for some sort of codegen, I don't think it makes sense to use it in specs.

@domenic domenic closed this as completed Oct 23, 2022
@saschanaz
Copy link
Member

saschanaz commented Oct 24, 2022

That's an interesting argument as there are already several attributes that uses WindowProxy in the spec. 👀

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

Successfully merging a pull request may close this issue.

4 participants