This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 8035 - HTMLAllCollection should inherit from HTMLCollection
Summary: HTMLAllCollection should inherit from HTMLCollection
Status: CLOSED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords: NE
Depends on:
Blocks:
 
Reported: 2009-10-23 22:38 UTC by Maciej Stachowiak
Modified: 2010-10-04 13:57 UTC (History)
4 users (show)

See Also:


Attachments

Description Maciej Stachowiak 2009-10-23 22:38:04 UTC
In browsers that expose global interface objects, the document.all object either is or inherits from HTMLCollection, thus allowing changes to HTMLCollection.prototype to affect it. In HTML5, it does not inherit, so it will not be affected by HTMLCollection.prototype changes. This seems like a needless change in behavior. 

I think it would be better for compatibility to make HTMLAllCollection inherit from HTMLCollection, add the tags() method, and define the differences in operation behavior in prose.
Comment 1 Maciej Stachowiak 2009-10-23 22:41:36 UTC
Note: the change I suggest would require making HTMLCollection.namedItem return "object" instead of "Element".
Comment 2 Ian 'Hixie' Hickson 2009-10-25 05:54:17 UTC
EDITOR'S RESPONSE: This is an Editor'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: Done, except I just put namedItem() in both interfaces so HTMLAllCollection overrides the other one.
Comment 3 contributor 2009-10-25 06:03:10 UTC
Checked in as WHATWG revision r4323.
Check-in comment: Make collections inherit from HTMLCollection
http://html5.org/tools/web-apps-tracker?from=4322&to=4323