This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 13462 - The spec doesn't make it clear what should happen to pending timeouts/intervals on the old Window
Summary: The spec doesn't make it clear what should happen to pending timeouts/interva...
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords: a11y
Depends on:
Blocks:
 
Reported: 2011-07-30 04:39 UTC by contributor
Modified: 2011-12-20 17:07 UTC (History)
7 users (show)

See Also:


Attachments

Description contributor 2011-07-30 04:39:00 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/content-models.html
Multipage: http://www.whatwg.org/C#opening-the-input-stream
Complete: http://www.whatwg.org/c#opening-the-input-stream

Comment:
The spec doesn't make it clear what should happen to pending
timeouts/intervals on the old Window

Posted from: 71.184.125.56
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0a1) Gecko/20110721 Firefox/8.0a1
Comment 1 Boris Zbarsky 2011-07-30 04:40:56 UTC
In fact, this is a general problem with the unloading section.  If the document is salvageable the timeout list is not cleared, but nothing anywhere says to suspend the timeouts as far as I can see.
Comment 2 Michael[tm] Smith 2011-08-04 05:05:49 UTC
mass-moved component to LC1
Comment 3 Ian 'Hixie' Hickson 2011-08-12 20:19:01 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter's comments.

I've made document.open() force salvageable to false while the unloading happens, then force it back to true for the "new" document.

In the case of history navigation, the timeouts are suspended because the algorithm for setTimeout and setInterval requires the time to be time spent with the document fully active. For example, step 7 of the setTimeout algorithm says "...wait until the Document associated with the method context has been fully active for a further timeout milliseconds (not necessarily consecutively).".

Please don't hesitate to reopen the bug if I've missed something here.
Comment 4 contributor 2011-08-12 20:19:19 UTC
Checked in as WHATWG revision r6431.
Check-in comment: Make document.open() reset the timeouts. Make the document after a document.open() call still survive session history even if the 'old' document had an unload handler.
http://html5.org/tools/web-apps-tracker?from=6430&to=6431