some pages use a vbscript-like function call to access the array element instead
of using . For example,
var a = document.getElementsByTagName("*");
var b = a(1); // the right way should be a
Created attachment 180353 [details] [diff] [review]
Robin Lu, won't it violate current W3C DOM Specifications?
I think DOM specification should be modified/enhanced before implement.
(or Ecma Standard of ECMAScript if enhancement for any array variables/objects
CC:ing to Boris.
This has come up before. I'd recommend reading existing bugs where this was
(In reply to comment #4)
> existing bugs where this was proposed....
And Bug 290592 is another enhancement?
> Bug 24644 Implement E4X in SpiderMonkey
> Bug 290592 Array extras: forEach, indexOf, filter, map, some, every
Correction of link to bug number. Sorry for spam.
> Bug 246441 : Implement E4X in SpiderMonkey
No, the bugs were not related to E4X.
The w3c shut down the DOM working group. ECMA is never going to standardize
this odious () for  VB-ism. So if we implement this, it will be because
enough bad content exists that people want to work in Firefox and other Mozilla
Gecko-based products, *and* that content's authors don't care or are not even
around to fix it. I doubt that is the case.
*** Bug 261050 has been marked as a duplicate of this bug. ***
(In reply to Brendan Eich [:brendan] from comment #8)
> The w3c shut down the DOM working group.
Browser competition led to the DOM core group being revived. But "caller" is deprecated. Cc'ing Cameron to confirm this resolution.
> ECMA is never going to standardize this odious () for  VB-ism.
That's still true.
> So if we implement this, it will be because
> enough bad content exists that people want to work in Firefox and other
> Mozilla Gecko-based products, *and* that content's authors don't care
> or are not even around to fix it. I doubt that is the case.
No evidence of this, so WONTFIX.
Yes, callers are deprecated. The keyword was changed to "legacycaller" to emphasise this, and the spec says explicitly
Specifications SHOULD NOT use legacy callers unless required to specify the
behavior of legacy APIs.