[whatwg] Adding ECMAScript 5 array extras to HTMLCollection (ATTN IE TEAM - TRAVIS LEITHEAD)
James Graham
jgraham at opera.com
Wed Apr 28 02:12:54 PDT 2010
On 04/28/2010 10:27 AM, David Bruant wrote:
> When I started this thread, my point was to define a normalized way
> (through ECMAScript binding) to add array extras to array-like objects
> in the scope of HTML5 (HTMLCollection and inheriting interfaces).
> I don't see any reason yet to try to find a solution to problems that
> are in current web browsers.
> Of course, if/when a proposal emerges from this thread and some user
> agent accept to implement it, a workaround (probably, feature detection)
> will have to be found to use the feature in user agents that implement
> it and doing something equivalent in web browsers that don't.
To be clear the proposals in this thread are pure syntactic sugar; they
don't allow you do do anything that you can't already do like:
Array.prototype.whatever.call(html_collection, arg1, arg2, ...)
where "whatever" is the array method you are interested in.
Of course there is nothing wrong with making the syntax more natural if
it can be done in a suitably web-compatible way. However it seems more
sensible to do this at a lower level e.g. as part of Web DOM Core. Sadly
that spec is in need of an editor.
More information about the whatwg
mailing list