<?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>10990</bug_id>
          
          <creation_ts>2010-10-07 21:51:53 +0000</creation_ts>
          <short_desc>HTMLFormElement.namedItem missing a case</short_desc>
          <delta_ts>2011-08-04 05:05:44 +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>LC1 HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</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="Cameron McCormack">cam</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>mounir</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>40820</commentid>
    <comment_count>0</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2010-10-07 21:51:53 +0000</bug_when>
    <thetext>Step 2 of the algorithm for HTMLFormElement.namedItem currently says:

  Otherwise, name is the name of one of the entries in the form element&apos;s past names map: return the object associated with name in that map.

However, it is possible to call namedItem with a name that is neither an element currently in the form nor the name of one of the entries in the past names map, since you can call namedItem directly:

  var f = document.createElement(&apos;form&apos;);
  f.namedItem(&apos;abc&apos;);

The algorithm should handle this case, or you should change the name getter declaration to:

  omittable caller getter any namedItem(in DOMString name);

so that there is no namedItem property on HTMLFormElements, if that&apos;s the intention.

(This may apply to other interfaces with name getters; I didn&apos;t check.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41310</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2010-10-14 08:25:02 +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: Partially Accepted
Change Description: see diff given below
Rationale: I just removed the names altogether, there&apos;s no use case for having them. The compat need is just for the indexing and calling abilities, IIRC. (I was unfortunately unable to test IE to check this. Please reopen the bug if this is a compat regression, and I&apos;ll fix it the other way instead.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41311</commentid>
    <comment_count>2</comment_count>
    <who name="">contributor</who>
    <bug_when>2010-10-14 08:26:50 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r5624.
Check-in comment: remove form.item() and form.namedItem() since 2/3 browsers I tested don&apos;t have it and removing them seems like a win.
http://html5.org/tools/web-apps-tracker?from=5623&amp;to=5624</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41385</commentid>
    <comment_count>3</comment_count>
      <attachid>923</attachid>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2010-10-14 21:59:22 +0000</bug_when>
    <thetext>Created attachment 923
Test whether HTMLFormElement name getter works

This test alerts an HTMLInputElement in IE9b.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52974</commentid>
    <comment_count>4</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-08-04 05:05:44 +0000</bug_when>
    <thetext>mass-moved component to LC1</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>923</attachid>
            <date>2010-10-14 21:59:22 +0000</date>
            <delta_ts>2010-10-14 21:59:22 +0000</delta_ts>
            <desc>Test whether HTMLFormElement name getter works</desc>
            <filename>form-nameditem.html</filename>
            <type>text/html</type>
            <size>94</size>
            <attacher name="Cameron McCormack">cam</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+Cjxmb3JtPjxpbnB1dCBuYW1lPWFiYz48L2Zvcm0+CjxzY3JpcHQ+CmFs
ZXJ0KGRvY3VtZW50LmZvcm1zWzBdLmFiYykKPC9zY3JpcHQ+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>