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

Behavior of window.close() #4405

Closed
annevk opened this issue Mar 1, 2019 · 2 comments
Closed

Behavior of window.close() #4405

annevk opened this issue Mar 1, 2019 · 2 comments
Labels
interop Implementations are not interoperable with each other topic: browsing context

Comments

@annevk
Copy link
Member

annevk commented Mar 1, 2019

I talked with @bzbarsky about window.close() a bit because of web-platform-tests/wpt#15518. It seems window.close() does two things:

  1. Immediately sets a flag that immediately affects window.closed and named targeting. (Chrome seems similar for window.closed; Safari not (branches on "discard"); did not test named targeting.)
  2. Queues a task to maybe discard. (There's no task involved currently, but there is in all browsers.)

This does raise the question of what kind of things can happen between window.close() and discarding. E.g., can you navigate, can you go back in history? More tests are needed.

Related PR that needs changes because of this: #4402.

Somewhat related: #1866, #4363.

@annevk annevk added interop Implementations are not interoperable with each other topic: browsing context labels Mar 1, 2019
@rniwa
Copy link

rniwa commented Mar 1, 2019

@cdumez

@annevk
Copy link
Member Author

annevk commented Mar 4, 2019

web-platform-tests/wpt#15649 has tests. I also pushed a fix to #4402.

@annevk annevk closed this as completed in 37b1ce5 Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interop Implementations are not interoperable with each other topic: browsing context
Development

No branches or pull requests

2 participants