The default bug view has changed. See this FAQ.

support access Array element via () instead of [] (IEism)

RESOLVED WONTFIX

Status

()

Core
DOM: Core & HTML
RESOLVED WONTFIX
12 years ago
3 years ago

People

(Reporter: Robin Lu, Assigned: Robin Lu)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

12 years ago
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.
(Assignee)

Comment 1

12 years ago
Created attachment 180353 [details] [diff] [review]
patch
Assignee: general → robin.lu
Status: NEW → ASSIGNED
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)
CC:ing to Boris.
This has come up before.  I'd recommend reading existing bugs where this was
proposed....
Whiteboard: DUPEME
(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 
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.

/be
QA Contact: ian → general
Wontfix?

Updated

6 years ago
Duplicate of this bug: 261050
(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
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → 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.

Updated

3 years ago
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.