<?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>27688</bug_id>
          
          <creation_ts>2014-12-23 21:53:26 +0000</creation_ts>
          <short_desc>Odd comment in DOM spec about the new &quot;Elements&quot; class</short_desc>
          <delta_ts>2015-07-15 06:49:15 +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="John Atkins">xuzepa</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>d</cc>
    
    <cc>jackalmage</cc>
    
    <cc>mike</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>116669</commentid>
    <comment_count>0</comment_count>
    <who name="John Atkins">xuzepa</who>
    <bug_when>2014-12-23 21:53:26 +0000</bug_when>
    <thetext>https://dom.spec.whatwg.org/#collections:-elements

[[
Elements is an ES6-style subclass of Array with two additional methods. It&apos;s the new NodeList / HTMLCollection. 
]]

How can a class named &quot;Elements&quot; legitimately replace the NodeList interface, when, in additions to Elements, a NodeList can also contain Text nodes and Comments etc?

There are comments throughout the spec about &quot;historical artifacts&quot; that &quot;we cannot rid the web of&quot; and yet this seems like another one in the making...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116670</commentid>
    <comment_count>1</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2014-12-23 22:55:11 +0000</bug_when>
    <thetext>The Elements class is for those functions that actually return only elements, like querySelectorAll and .childElements, etc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120232</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2015-05-08 09:19:19 +0000</bug_when>
    <thetext>It&apos;s interesting to consider whether perhaps we should give it a different name so it can in the future also be used for cases where we want to represent more than elements. Or whether we should restrict it to elements as the name suggests now... (And add a distinct class for nodes.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122050</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2015-07-15 06:49:15 +0000</bug_when>
    <thetext>If we need to represent nodes the methods don&apos;t make sense. We&apos;d just use a simple Array for those cases.

I did clarify the statement a bit to make that more clear:

https://github.com/whatwg/dom/commit/96ef454f2f3326cf95b878b783a16a2dee16d4d3

Thanks for your input!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>