<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>28772</bug_id>
          
          <creation_ts>2015-06-06 04:36:12 +0000</creation_ts>
          <short_desc>fired unload flag never gets set back to false for document.open</short_desc>
          <delta_ts>2016-04-21 22:29:24 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          
          <bug_file_loc>https://html.spec.whatwg.org/#unloading-documents</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>annevk</cc>
    
    <cc>bzbarsky</cc>
    
    <cc>d</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>120759</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2015-06-06 04:36:12 +0000</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120760</commentid>
    <comment_count>1</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2015-06-06 04:38:27 +0000</bug_when>
    <thetext>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 &quot;fired unload flag&quot; to true.

But if the document is later unloaded (e.g. by a navigation) that means it won&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125606</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2016-03-23 13:35:27 +0000</bug_when>
    <thetext>So, introduce a new step before &quot;Unload event&quot; that says &quot;If /recycle/ is true, set the Document&apos;s fired unload flag to false.&quot;?

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

(The &quot;if any event listeners were triggered&quot; condition is also interesting. That&apos;s a primitive the DOM Standard does not really offer at the moment.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126038</commentid>
    <comment_count>3</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2016-04-21 22:29:24 +0000</bug_when>
    <thetext>https://github.com/whatwg/html/pull/1018</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>