<?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>14275</bug_id>
          
          <creation_ts>2011-09-24 12:42:31 +0000</creation_ts>
          <short_desc>This non-normative box is not very clean. After all, using DOM methods or innerHTML also could make DOM not correspond source code of document (heck, older versions of IE did some transformations). Also, as long you won&apos;t use async or defer I cannot think</short_desc>
          <delta_ts>2012-01-27 00:31:01 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#document.write()</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>hsivonen</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>57302</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-09-24 12:42:31 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/content-models.html
Multipage: http://www.whatwg.org/C#document.write()
Complete: http://www.whatwg.org/c#document.write()

Comment:
This non-normative box is not very clean. After all, using DOM methods or
innerHTML also could make DOM not correspond source code of document (heck,
older versions of IE did some transformations). Also, as long you won&apos;t use
async or defer I cannot think of case where document.write() would depend on
network latency...

Posted from: 178.36.189.188 by glitch.mr@gmail.com
User agent: Opera/9.80 (Windows NT 6.1; U; pl) Presto/2.9.168 Version/11.51</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57665</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-10-02 18:06:27 +0000</bug_when>
    <thetext>&gt; After all, using DOM methods or
&gt; innerHTML also could make DOM not correspond source code of document

This warning is talking about much more serious cases than that. For example, if you document.write() the string &quot;&lt;plaintext&gt;&quot;, the rest of the document is turned to text, regardless. With innerHTML and DOM manipulation, you can&apos;t cause the parser to parse parts of the document differently than it otherwise would have.


&gt; Also, as long you won&apos;t use
&gt; async or defer I cannot think of case where document.write() would depend on
&gt; network latency...

The case in which it does depend on latency escapes me right now, but I&apos;m pretty sure there is one...

Anyone remember what it is?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57684</commentid>
    <comment_count>2</comment_count>
    <who name="Henri Sivonen">hsivonen</who>
    <bug_when>2011-10-03 05:48:43 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; The case in which it does depend on latency escapes me right now, but I&apos;m
&gt; pretty sure there is one...
&gt; 
&gt; Anyone remember what it is?

Nothing that I know of in Gecko. In some spec draft, there was, IIRC, a case where returning from document.write depended on whether style sheets were loading.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57690</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2011-10-03 08:07:08 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; &gt; After all, using DOM methods or
&gt; &gt; innerHTML also could make DOM not correspond source code of document
&gt; 
&gt; This warning is talking about much more serious cases than that. For example,
&gt; if you document.write() the string &quot;&lt;plaintext&gt;&quot;, the rest of the document is
&gt; turned to text, regardless. With innerHTML and DOM manipulation, you can&apos;t
&gt; cause the parser to parse parts of the document differently than it otherwise
&gt; would have.

It would be good if you made the note clearer on this point.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63165</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-01-26 22:29:01 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;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: Making text clearer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63166</commentid>
    <comment_count>5</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-01-26 22:29:37 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r6923.
Check-in comment: Slight tweaks to the anti-document.write() warning.
http://html5.org/tools/web-apps-tracker?from=6922&amp;to=6923</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63171</commentid>
    <comment_count>6</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-01-27 00:31:01 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r6924.
Check-in comment: More tweaks to the text (including a comment that describes one of the situations in question).
http://html5.org/tools/web-apps-tracker?from=6923&amp;to=6924</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>