New issue
Advanced search Search tips

Issue 594049 link

Starred by 9 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Launch-OWP
Launch-Accessibility: ----
Launch-Exp-Leadership: ----
Launch-Leadership: ----
Launch-Legal: ----
Launch-M-Approved: 56-Stable
Launch-M-Target: ----
Launch-Privacy: ----
Launch-Security: ----
Launch-Test: ----
Launch-UI: ----
Rollout-Type: ----

Blocked on:
issue 554834



Sign in to add a comment

Fire visibilitychange event as part of unload process

Project Member Reported by kinuko@chromium.org, Mar 11 2016

Issue description

(See http://www.chromium.org/blink#launch-process for an overview)

Change description:
visibilitychange event should fire as part of unload process and document.visibilityState should report `hidden`.

Changes to API surface:
visibilitychange event starts to fire when unloading the document.

Links:
Spec: http://w3c.github.io/page-visibility/#reacting-to-visibility-changes
Discussion (already closed): https://github.com/w3c/page-visibility/issues/18

Support in other browsers:
Internet Explorer: No
Firefox: Yes
Safari: No (tracking bug: https://bugs.webkit.org/show_bug.cgi?id=151234 )

Additional note:
We'll need to add proper restrictions in this visibilitychange as calling some APIs could do the things that are undesirable during unload step; like: showing modal dialog (this is already prohibited for unload events), running nested message loop etc.


 

Comment 1 by kinuko@chromium.org, Mar 11 2016

Blockedon: -554834
Labels: Hotlist-PerformanceAPIs
kinuko: you removed dependency on 554834.. is that one fixed? What's blocking us from shipping and resolving 554834 and this bug?

Comment 4 by kinuko@chromium.org, Jul 19 2016

Blockedon: 554834
#3- sorry, I don't really remember why I removed the dependency... (why did I!?)

554834 is basically blocked by lack of restrictions / potential crashes we have in unload/visibilitychange event handling, esp. in detached iframe cases. Some discussion is ongoing about what could/should be supported by our implementation (in binding layer), while we also probably want to have spec clarify what should be disabled in detached frames-- e.g. disabling various platform APIs and navigating to a unique origin for the detached script execution etc (while the current spec requires everything should just work, which is not realistic).
> while we also probably want to have spec clarify what should be disabled in detached frames-- e.g. disabling various platform APIs and navigating to a unique origin for the detached script execution etc

By the "spec" you're referring to HTML spec? I don't think these cases are restricted to PV, correct?
Labels: -M-51

Comment 7 by kinuko@chromium.org, Feb 10 2017

Labels: Launch-M-Approved-56-Stable
Status: Fixed (was: Assigned)
Enabled by default since M56.

Sign in to add a comment