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 20020 - Support subclassing Array
Summary: Support subclassing Array
Status: NEW
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: WebIDL (show other bugs)
Version: unspecified
Hardware: PC Windows 3.1
: P2 normal
Target Milestone: ---
Assignee: Cameron McCormack
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-20 12:48 UTC by Anne
Modified: 2013-09-13 16:08 UTC (History)
5 users (show)

See Also:


Attachments

Description Anne 2012-11-20 12:48:56 UTC
For the URL API I think we want to introduce URL.segments to get access to the path segments for URLs with their relative flag set. This is naturally an Array, but manipulation needs to affect the URL and the value that is being set needs to be percent-encoded (and required to be a string and such).
Comment 1 Anne 2013-09-12 14:41:51 UTC
In http://dom.spec.whatwg.org/#elements we want Elements.prototype.queryAll to return this.constructor ideally.

Are we hitting the limits of IDL and should we define all of this using JavaScript prose instead?
Comment 2 Garrett 2013-09-12 17:44:55 UTC
(In reply to Anne from comment #1)
> In http://dom.spec.whatwg.org/#elements we want Elements.prototype.queryAll
> to return this.constructor ideally.
>
That is a terrible name. You have interfaces Elements and Element. Can you rename Elements to ElementList?

And the parameter name is plural, too, though it replresents a string. Can we instead call that relativeSelectorText?
Comment 3 Anne 2013-09-13 15:56:07 UTC
I was correct in comment 1, but we should fix IDL. Not having it is not really an option. The other point here is that these methods on Array should not do instance checks, ideally they are generics. How do we indicate that?
Comment 4 Garrett 2013-09-13 16:08:27 UTC
Describe in steps what you want to have happen.