<?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>22959</bug_id>
          
          <creation_ts>2013-08-14 15:10:47 +0000</creation_ts>
          <short_desc>Nullable parameter in tail position should be optional</short_desc>
          <delta_ts>2013-08-16 10:42:53 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>DOM</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Erik Arvidsson">erik.arvidsson</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>bugs</cc>
    
    <cc>mike</cc>
    
    <cc>Ms2ger</cc>
    
    <cc>travil</cc>
    
    <cc>www-dom</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>92044</commentid>
    <comment_count>0</comment_count>
    <who name="Erik Arvidsson">erik.arvidsson</who>
    <bug_when>2013-08-14 15:10:47 +0000</bug_when>
    <thetext>For example:

http://dom.spec.whatwg.org/#domimplementation

XMLDocument createDocument(DOMString? namespace, [TreatNullAs=EmptyString] DOMString qualifiedName, DocumentType? doctype);

It really is silly to force people to write createDocument(ns, &apos;root&apos;, null)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92046</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-08-14 15:51:27 +0000</bug_when>
    <thetext>The reason this is not changed is because we have new Document() these days.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92048</commentid>
    <comment_count>2</comment_count>
    <who name="Erik Arvidsson">erik.arvidsson</who>
    <bug_when>2013-08-14 16:00:04 +0000</bug_when>
    <thetext>There are other cases. For example

boolean hasFeature(DOMString feature, [TreatNullAs=EmptyString] DOMString version);

would be better as

boolean hasFeature(DOMString feature, optional [TreatNullAs=EmptyString] DOMString version);</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92049</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-08-14 16:08:15 +0000</bug_when>
    <thetext>Could you list the others? hasFeature is not done because the feature should not be used.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92050</commentid>
    <comment_count>4</comment_count>
    <who name="Erik Arvidsson">erik.arvidsson</who>
    <bug_when>2013-08-14 16:22:43 +0000</bug_when>
    <thetext>I still think doctype should be optional in createDocument. createDocument is still used since new Document has other issues. I&apos;ll file a new bug about that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92052</commentid>
    <comment_count>5</comment_count>
    <who name="Erik Arvidsson">erik.arvidsson</who>
    <bug_when>2013-08-14 16:47:28 +0000</bug_when>
    <thetext>For Document issue see https://www.w3.org/Bugs/Public/show_bug.cgi?id=22960</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92054</commentid>
    <comment_count>6</comment_count>
    <who name="Erik Arvidsson">erik.arvidsson</who>
    <bug_when>2013-08-14 17:39:08 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; Could you list the others? hasFeature is not done because the feature should
&gt; not be used.

It is actually only hasFeature and createDocument that has this kind of signature.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92088</commentid>
    <comment_count>7</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-08-15 11:19:17 +0000</bug_when>
    <thetext>We could make it optional. But that doesn&apos;t make it optional in all browsers right away. It&apos;s not clear what the advantage is, other than it would more closely align with Chrome / Safari and less with Gecko / IE for the foreseeable future.

Given that both Gecko / IE implement IDL (as I understand) making createDocument()&apos;s arguments optional could be pretty trivial however and maybe that&apos;s okay with Olli and Travis?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92091</commentid>
    <comment_count>8</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2013-08-15 14:19:42 +0000</bug_when>
    <thetext>I would not change hasFeature, just because it shouldn&apos;t be used at all.
But making the last param of createDocument optional sounds ok to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92151</commentid>
    <comment_count>9</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-08-16 10:42:53 +0000</bug_when>
    <thetext>https://github.com/whatwg/dom/commit/b6354d791f9998540a8de929da747f3945b005ff</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>