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

Disallow during unload #3960

merged 1 commit into from Oct 31, 2018


6 participants
Copy link

TimothyGu commented Aug 24, 2018

Chrome would like to limit the usage of, and we believe that there is rarely a valid purpose for that function when a page is exiting. We propose here a model for limiting similar to mechanisms already in place for modal dialogs like alert(), confirm(), and prompt() with event loop's termination nesting level, which additionally prevents the unloaded page to use a in another synchronously accessible windows.

However, one difference between the proposed algorithm and the modal dialog functions is that the early return is mandatory unlike the returns in those functions. We have a strong preference to do that, as it allows testing through WPTs for browser interoperability.

Tests: web-platform-tests/wpt#12577

/cc @avidrissman, who has already implemented this change in Chromium.

/window-object.html ( diff )


This comment has been minimized.

Copy link

annevk commented Aug 25, 2018

@bzbarsky @cdumez @dstorey any implementer feedback on this? This seems pretty reasonable to me.


This comment has been minimized.

Copy link

chrisdavidmills commented Oct 31, 2018

Documentation need recorded at MDN content roadmap —


This comment has been minimized.

Copy link

cdumez commented Oct 31, 2018

Seems reasonable to me as well, I'd be willing to align WebKit since it is already implemented in Blink.

@domenic domenic merged commit 3b401f9 into whatwg:master Oct 31, 2018

2 checks passed

Participation TimothyGu participates on behalf of Google LLC
continuous-integration/travis-ci/pr The Travis CI build passed

@TimothyGu TimothyGu deleted the TimothyGu:window-open-termination-level branch Oct 31, 2018

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