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

Collapse disowned into opener browsing context #8573

Merged
merged 2 commits into from
Feb 15, 2023
Merged

Collapse disowned into opener browsing context #8573

merged 2 commits into from
Feb 15, 2023

Conversation

annevk
Copy link
Member

@annevk annevk commented Dec 1, 2022

Tests: TODO. Ideas:

  • Create a popup. Set opener to null. Then name target it. Opener should be back now pointing to whatever name-targeted it.
  • Create a popup. Set opener to "blah". This writes a property to the Window object. Can we still get the original opener getter somehow and see the actual opener or is this lost?

Fixes #5569.

(See WHATWG Working Mode: Changes for more details.)


/browsing-the-web.html ( diff )
/document-sequences.html ( diff )
/nav-history-apis.html ( diff )

@annevk annevk added the needs tests Moving the issue forward requires someone to write tests label Dec 1, 2022
@domenic
Copy link
Member

domenic commented Dec 1, 2022

  • Can we still get the original opener getter somehow and see the actual opener or is this lost?

If you have a same-origin iframe handy, this should work:

const getter = Object.getOwnPropertyDescriptor(frames[0], "opener").get;

const actualOpener = getter.call(popupWindow);

Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normative changes look good, but we should keep the note in some form.

source Outdated Show resolved Hide resolved
annevk added a commit to web-platform-tests/wpt that referenced this pull request Feb 10, 2023
@annevk
Copy link
Member Author

annevk commented Feb 10, 2023

I'm no longer convinced my first suggested test case is good. I think you might end up with two popups due to #313.

I created a test case for the second case: web-platform-tests/wpt#38447.

@annevk annevk requested a review from domenic February 10, 2023 13:45
@annevk annevk removed the needs tests Moving the issue forward requires someone to write tests label Feb 10, 2023
@domenic domenic added clarification Standard could be clearer topic: browsing context labels Feb 15, 2023
annevk added a commit to web-platform-tests/wpt that referenced this pull request Feb 15, 2023
@annevk annevk merged commit 2f6e75f into main Feb 15, 2023
@annevk annevk deleted the annevk/disowned branch February 15, 2023 07:35
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Mar 1, 2023
Automatic update from web-platform-tests
HTML: set opener to a string

For whatwg/html#8573.
--

wpt-commits: 56df3bcc084365faeb2aa67ea937a927c5986e7a
wpt-pr: 38447
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Mar 1, 2023
Automatic update from web-platform-tests
HTML: set opener to a string

For whatwg/html#8573.
--

wpt-commits: 56df3bcc084365faeb2aa67ea937a927c5986e7a
wpt-pr: 38447
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Mar 2, 2023
Automatic update from web-platform-tests
HTML: set opener to a string

For whatwg/html#8573.
--

wpt-commits: 56df3bcc084365faeb2aa67ea937a927c5986e7a
wpt-pr: 38447
marcoscaceres pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

Can "disowned" and "opener browsing context" be collapsed?
2 participants