<?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>6036</bug_id>
          
          <creation_ts>2008-09-07 14:32:27 +0000</creation_ts>
          <short_desc>HTMLCollection.namedItem() should look for non-HTML elements</short_desc>
          <delta_ts>2010-10-04 13:57:10 +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>pre-LC1 HTML5 spec (editor: Ian Hickson)</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</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="Simon Pieters">zcorpan</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>annevk</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>21814</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2008-09-07 14:32:27 +0000</bug_when>
    <thetext>The spec says about HTMLCollection.namedItem():

&quot;It is an HTML element of any kind with an id attribute equal to key. (Non-HTML elements, even if they have IDs, are not searched for the purposes of namedItem().)&quot;

I think this should be changed to look for non-HTML elements too. It already does in Opera and Firefox (not WebKit). There&apos;s a .children attribute on Element that returns HTMLCollection and I think it would be silly if namedItem only worked for HTML elements.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21815</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2008-09-07 22:13:41 +0000</bug_when>
    <thetext>Should it still look just at id attributes in that case though? Or ID attributes?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21819</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2008-09-08 11:44:46 +0000</bug_when>
    <thetext>I don&apos;t really care either way. (Or well, I&apos;d *like* XML ID 5 that makes all &apos;id&apos; attributes of type ID.)

Firefox looks at &apos;id&apos; attributes on any element. Opera looks at &apos;id&apos; attributes on HTML and SVG elements.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>