-
Notifications
You must be signed in to change notification settings - Fork 173
Review handling of WindowProxy #656
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
Comments
Moving https://www.w3.org/Bugs/Public/show_bug.cgi?id=29386 to here; see there for a bit of background. |
whatwg/html#3997 might also be of interest. |
So conclusions from last time:
What is the reason that "implements" and "is a platform object" need to deal with WindowProxy? |
I guess they might not need to if we don't allow |
Here's a simple example. Let's say I do:
What should happen? When |
So I was thinking I could give |
Could an alternative be to tackle this through https://heycam.github.io/webidl/#es-type-mapping? That we assert that the JS value is not a Window object and when given a JS WindowProxy object, we return the IDL Window object for the JS WindowProxy's [[Window]] object? And that an IDL Window object is mapped back to a JS WindowProxy object (it seems this would have to go through the browsing context which isn't ideal). |
This doesn't solve the point in #656 (comment). https://heycam.github.io/webidl/#dfn-create-operation-function step 2.1.2.2 never goes through ES type matching. It also doesn't solve the problem where specs assume they are operating on IDL
If that step was replaced with a proper type conversion (which is probably a good idea), then your suggestion would solve that problem.
At first this seemed like a good idea, for making more rigorous APIs that return Currently I think HTML often hand-waves going from Window to WindowProxy, e.g. https://html.spec.whatwg.org/#posting-messages:windowproxy or https://html.spec.whatwg.org/#timers:windowproxy or https://html.spec.whatwg.org/#windowproxy-getownproperty:windowproxy-3. It's probably reasonable to formalize Window having a pointer back to its WindowProxy, if that ends up being helpful. |
@bzbarsky opens this can of worms in #654 (comment).
Probably every instance of "implements" or "is a platform object" should allow WindowProxy.
The text was updated successfully, but these errors were encountered: