Last Comment Bug 289876 - support access Array element via () instead of [] (IEism)
: support access Array element via () instead of [] (IEism)
Status: RESOLVED WONTFIX
:
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Robin Lu
:
Mentors:
: 261050 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-11 03:10 PDT by Robin Lu
Modified: 2014-01-16 08:21 PST (History)
11 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (3.99 KB, patch)
2005-04-11 03:12 PDT, Robin Lu
no flags Details | Diff | Splinter Review

Description Robin Lu 2005-04-11 03:10:26 PDT
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[1]

In mozilla/firefox, a "... is not a function" javascript error is generated for
this issue.
Comment 1 Robin Lu 2005-04-11 03:12:09 PDT
Created attachment 180353 [details] [diff] [review]
patch
Comment 2 WADA 2005-04-11 17:49:27 PDT
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
of JavaScript)
Comment 3 WADA 2005-04-17 16:46:08 PDT
CC:ing to Boris.
Comment 4 Boris Zbarsky [:bz] 2005-04-17 16:56:37 PDT
This has come up before.  I'd recommend reading existing bugs where this was
proposed....
Comment 5 WADA 2005-04-17 17:36:09 PDT
(In reply to comment #4)
> existing bugs where this was proposed....
Bug 24644?
And Bug 290592 is another enhancement?
> Bug 24644  Implement E4X in SpiderMonkey
> Bug 290592 Array extras: forEach, indexOf, filter, map, some, every 
Comment 6 WADA 2005-04-17 17:41:38 PDT
Correction of link to bug number. Sorry for spam.
> Bug 246441 : Implement E4X in SpiderMonkey
Comment 7 Boris Zbarsky [:bz] 2005-04-17 17:46:45 PDT
No, the bugs were not related to E4X.
Comment 8 Brendan Eich [:brendan] 2005-04-17 21:35:02 PDT
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.

/be
Comment 9 :Ms2ger (⌚ UTC+1/+2) 2011-10-09 09:34:23 PDT
Wontfix?
Comment 10 :Ms2ger (⌚ UTC+1/+2) 2011-10-09 11:35:25 PDT
*** Bug 261050 has been marked as a duplicate of this bug. ***
Comment 11 Brendan Eich [:brendan] 2011-10-09 12:44:20 PDT
(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.

/be
Comment 12 Cameron McCormack (:heycam) 2011-10-10 18:58:23 PDT
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.

Note You need to log in before you can comment on or make changes to this bug.