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 28772 - fired unload flag never gets set back to false for document.open
Summary: fired unload flag never gets set back to false for document.open
Status: RESOLVED MOVED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: https://html.spec.whatwg.org/#unloadi...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-06 04:36 UTC by contributor
Modified: 2016-04-21 22:29 UTC (History)
4 users (show)

See Also:


Attachments

Description contributor 2015-06-06 04:36:12 UTC
Specification: https://html.spec.whatwg.org/multipage/browsers.html
Multipage: https://html.spec.whatwg.org/multipage/#unloading-documents
Complete: https://html.spec.whatwg.org/#unloading-documents
Referrer: 

Comment:
fired unload flag never gets set back to false for document.open

Posted from: 98.110.194.132
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:41.0) Gecko/20100101 Firefox/41.0
Comment 1 Boris Zbarsky 2015-06-06 04:38:27 UTC
https://html.spec.whatwg.org/multipage/webappapis.html#opening-the-input-stream step 10 says to do https://html.spec.whatwg.org/multipage/browsers.html#unload-a-document which will fire unload and set the "fired unload flag" to true.

But if the document is later unloaded (e.g. by a navigation) that means it won't fire unload at that time, no?

Seems to me like the steps for document.open (or document unloading when the recycle flag is set?) should set this boolean back to false somewhere.
Comment 2 Anne 2016-03-23 13:35:27 UTC
So, introduce a new step before "Unload event" that says "If /recycle/ is true, set the Document's fired unload flag to false."?

I'm a little bit out of my debt here, but happy to fix this.

(The "if any event listeners were triggered" condition is also interesting. That's a primitive the DOM Standard does not really offer at the moment.)
Comment 3 Domenic Denicola 2016-04-21 22:29:24 UTC
https://github.com/whatwg/html/pull/1018