<?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>22291</bug_id>
          
          <creation_ts>2013-06-06 06:21:54 +0000</creation_ts>
          <short_desc>Should indexing form with &quot;&quot; work?</short_desc>
          <delta_ts>2013-07-11 20:12:38 +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>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/#the-form-element</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="Ms2ger">Ms2ger</assigned_to>
          <cc>annevk</cc>
    
    <cc>bzbarsky</cc>
    
    <cc>hober0</cc>
    
    <cc>ian</cc>
    
    <cc>james</cc>
    
    <cc>mike</cc>
    
    <cc>Ms2ger</cc>
    
    <cc>travil</cc>
    
    <cc>w3c</cc>
    
    <cc>www-dom</cc>
    
    <cc>zcorpan</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>88803</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-06-06 06:21:54 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html
Multipage: http://www.whatwg.org/C#the-form-element
Complete: http://www.whatwg.org/c#the-form-element
Referrer: http://www.whatwg.org/specs/web-apps/current-work/multipage/

Comment:
Should indexing form with &quot;&quot; work?

Posted from: 98.110.194.206 by bzbarsky@mit.edu
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20130605 Firefox/24.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88804</commentid>
    <comment_count>1</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2013-06-06 06:23:39 +0000</bug_when>
    <thetext>Consider this testcase:

  &lt;form&gt;
    &lt;img id=&quot;&quot;&gt;
  &lt;/form&gt;
  &lt;script&gt;
    alert(document.querySelector(&quot;form&quot;)[&quot;&quot;]);
  &lt;/script&gt;

Per spec as written right now this should alert an image element, I think.  That&apos;s not what it does in at least Gecko and WebKit; I haven&apos;t tested trident.

It may be better to exclude thing with empty names/ids from this named getter...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89104</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-06-11 18:18:44 +0000</bug_when>
    <thetext>Questions I need to research:
Does it work with any named getters? Any based on id=&quot;&quot; or name=&quot;&quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89434</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-06-18 00:09:38 +0000</bug_when>
    <thetext>document.images[&apos;&apos;]: Firefox yes, Chrome yes, Safari no,  IE no.
select.options[&apos;&apos;]:  Firefox yes, Chrome no,  Safari no,  IE fails control.
document.embeds[&apos;&apos;]: Firefox yes, Chrome yes, Safari no,  IE no.
document.links[&apos;&apos;]:  Firefox yes, Chrome yes, Safari no,  IE fails control.
document.forms[&apos;&apos;]:  Firefox yes, Chrome yes, Safari no,  IE no.
document.all[&apos;&apos;]:    Firefox no,  Chrome no,  Safari no,  IE no.
document[&apos;&apos;]:        Firefox no,  Chrome no,  Safari no,  IE no.
window[&apos;&apos;]:          Firefox no,  Chrome no,  Safari no,  IE no.
localStorage[&apos;&apos;]:    Firefox yes, Chrome yes, Safari yes, IE yes.
form[&apos;&apos;] (this bug): Firefox no,  Chrome no,  Safari no,  IE no.

TESTCASES:
images http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2327
options http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2328
embeds http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2329
links http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2331
forms http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2332
document.all http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2333
document http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2334
window http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2336
localStorage http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2337
form http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2338

I guess I should just omit &quot;&quot; names from all collections, so that everything is consistent. Any objections?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89443</commentid>
    <comment_count>4</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2013-06-18 02:12:57 +0000</bug_when>
    <thetext>That seems fine to me for all the HTMLCollection bits there.  I&apos;m not sure about localStorage, since we have compat with &quot;yes&quot; from everyone and it&apos;s a very different beast from the rest...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90143</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-07-02 21:22:01 +0000</bug_when>
    <thetext>Yeah, I&apos;ll leave localStorage.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90144</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-07-02 21:45:35 +0000</bug_when>
    <thetext>Done for HTML. Reassigning to DOM Core for the HTMLCollection objects, since DOM Core took those from HTML a while back.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90145</commentid>
    <comment_count>7</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-07-02 21:45:44 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r8010.
Check-in comment: Make the empty string no longer be a possible index for most objects that can be indexed by name.
http://html5.org/tools/web-apps-tracker?from=8009&amp;to=8010</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90592</commentid>
    <comment_count>8</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2013-07-10 16:31:59 +0000</bug_when>
    <thetext>+----------------+---------------------------------------------+---------------+
| Test results   | Firefox   Chrome      Safari      IE        | spec          |
+----------------+---------------------------------------------+---------------+
| gEBTN - http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2400     |
|   namedItem    | elt       n/a         n/a         null      | null          |
|   named getter | elt       undefined   undefined   undefined | undefined     |
| gEBTNNS - http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2401   |
|   namedItem    | elt       n/a         n/a         null      | null          |
|   named getter | elt       undefined   undefined   undefined | undefined     |
| gEBCN - http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2398     |
|   namedItem    | elt       n/a         n/a         null      | null          |
|   named getter | elt       undefined   undefined   undefined | undefined     |
| children - http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2402  |
|   namedItem    | elt       elt         undefined   null      | null          |
|   named getter | elt       elt         undefined   undefined | undefined     |
+----------------+---------------------------------------------+---------------+

https://github.com/whatwg/dom/commit/35625e7dae457da7b2906b535edfe96ce6c85998</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90647</commentid>
    <comment_count>9</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2013-07-11 20:12:38 +0000</bug_when>
    <thetext>http://w3c-test.org/web-platform-tests/master/dom/collections/HTMLCollection-empty-name.html</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>