<?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>20288</bug_id>
          
          <creation_ts>2012-12-07 08:20:41 +0000</creation_ts>
          <short_desc>Type argument to Document.open needs to allow &quot;replace&quot; as an alias for &quot;text/html&quot;</short_desc>
          <delta_ts>2013-03-05 01:07:23 +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>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#opening-the-input-stream</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>bzbarsky</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>79626</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-12-07 08:20:41 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html
Multipage: http://www.whatwg.org/C#opening-the-input-stream
Complete: http://www.whatwg.org/c#opening-the-input-stream

Comment:
Type argument to Document.open needs to allow &quot;replace&quot;

Posted from: 173.48.81.109 by bzbarsky@mit.edu
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20121203 Firefox/20.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79627</commentid>
    <comment_count>1</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-12-07 08:25:29 +0000</bug_when>
    <thetext>The behavior of different UAs for the &quot;type&quot; argument of Document.open is as follows:

IE and WebKit: Values other than &quot;text/plain&quot; (after truncating at &apos;;&apos;?) are
   treated as HTML.
Opera: Values other than &quot;text/html&quot; are treated as text
Gecko: &quot;text/html&quot; and literal (case-sensitive) &quot;replace&quot; are treated as HTML,
   the rest as text.  When we tried doing what Opera does we ran into compat
   issues back when.  See https://bugzilla.mozilla.org/show_bug.cgi?id=313217</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80769</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-12-31 05:18:00 +0000</bug_when>
    <thetext>Do you have to act as if the fourth argument is also set to &quot;replace&quot; in this situation? (i.e. is it just that the type argument is optional?) Or does it not replace in this situation?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80786</commentid>
    <comment_count>3</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-12-31 06:56:05 +0000</bug_when>
    <thetext>&gt; Do you have to act as if the fourth argument is also set to &quot;replace&quot; in this
&gt; situation?

No.  Not replacing was not a problem in the cases we dealt with.  We just treat &quot;replace&quot; as an alias for &quot;text/html&quot; in the third argument and the fourth argument behaves as normal (i.e. not replacing if it wasn&apos;t passed).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83981</commentid>
    <comment_count>4</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-03-05 01:07:23 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r7729.
Check-in comment: document.open() legacy hack for compat
http://html5.org/tools/web-apps-tracker?from=7728&amp;to=7729</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>