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

Questions about "termination nesting level" and "ignore-opens-during-unload counter" #2666

Open
annevk opened this issue May 11, 2017 · 3 comments

Comments

@annevk
Copy link
Member

annevk commented May 11, 2017

Are the only reason these are counters because they are used by both prompt to unload and unload?

Why is termination nesting level decreased sooner?

@annevk
Copy link
Member Author

annevk commented May 11, 2017

In particular it would be useful to have a distinct feature for just "prompt to unload" as the navigate algorithm tries to prevent itself from being invoked on an target browsing context's active document while prompt to unload is running. It currently does so without state and just some prose, which isn't great.

@domenic
Copy link
Member

domenic commented May 11, 2017

Are the only reason these are counters because they are used by both prompt to unload and unload?

I think these algorithms can be called recursively too e.g. by using window.close() during onbeforeunload.

Why is termination nesting level decreased sooner?

Not sure; perhaps observed behavior? It does seem like document.open() would be more weird to do during any of these stages, where e.g. window.alert() might be fine.

@annevk
Copy link
Member Author

annevk commented May 11, 2017

Not sure; perhaps observed behavior?

Unless any "unloading document cleanup steps" have side effects (I don't think that's supposed to be allowed) there doesn't seem to be a difference.

I was also wondering why termination nesting level was bound to the event loop. Currently event loop isn't tightly bound to something, so that seems like a questionable choice.

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

No branches or pull requests

2 participants