[Bug 27688] New: Odd comment in DOM spec about the new "Elements" class

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 27688] New: Odd comment in DOM spec about the new "Elements" class

Bugzilla from bugzilla@jessica.w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27688

            Bug ID: 27688
           Summary: Odd comment in DOM spec about the new "Elements" class
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DOM
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]
                CC: [hidden email], [hidden email]

https://dom.spec.whatwg.org/#collections:-elements

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

How can a class named "Elements" 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 "historical artifacts" that "we
cannot rid the web of" and yet this seems like another one in the making...

--
You are receiving this mail because:
You are on the CC list for the bug.

Reply | Threaded
Open this post in threaded view
|

[Bug 27688] Odd comment in DOM spec about the new "Elements" class

Bugzilla from bugzilla@jessica.w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27688

Anne <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Anne <[hidden email]> ---
If we need to represent nodes the methods don't make sense. We'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!

--
You are receiving this mail because:
You are on the CC list for the bug.