RE: [PageVisibility] Hooks in Unload Processing Model

> Is there an updated draft somewhere that uses this hook? The latest editor's draft seems to try to override parts of the algorithm instead.

Sorry, I haven't edited that section of the spec yet; the current text was prior to the hook being added to the HTML5 unload processing model. 

However, I do have a question on that section. I have been receiving feedback from within Microsoft and partners regarding firing the visibilitychange event when the Document is unloading. Based on the current usage of this interface, we have seen that most developers rely solely on the hidden attribute and not the visibilityState attribute. Considering most activity throttling work is designed for when the page is hidden but active, if we fire the visibilitychange event during the unload, we may be running code developers did not intend to run during the unload. This may unexpectedly increase the overall time it takes to navigate.

Considering adoption of the unload event for end of page activities is prolific on the web, and seeing that the pagehide event also fires in this case, I want to understand if we really need to provide another hook here. 

Thanks,
Jatinder

Received on Tuesday, 3 April 2012 18:48:31 UTC