unhelpful "deprecated getter usage" warning

RESOLVED INVALID

Status

()

--
minor
RESOLVED INVALID
18 years ago
8 years ago

People

(Reporter: jruderman, Unassigned)

Tracking

Trunk
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

18 years ago
When I load this testcase, I get a "deprecated getter usage" warning on the 
javascript console, but no indication of what the correct syntax is.  The 
message should say what the correct syntax is or give a URL explaining what the 
correct syntax is.

I tried looking at Mozilla's source code to figure out what was generating the 
message, but instead of finding the string "deprecated getter usage", all I 
found was http://lxr.mozilla.org/seamonkey/source/js/src/js.msg#233 :
MSG_DEF(JSMSG_DEPRECATED_USAGE, 158, 1, JSEXN_REFERENCEERR, "deprecated {0} 
usage").
(Reporter)

Comment 1

18 years ago
Created attachment 32520 [details]
testcase

Comment 2

18 years ago
This is a core jsengine issue. Reassigning.
Can anyone point out a document explaining the supported syntax?
Assignee: jband → rogerl
Component: JavaScript Debugger → Javascript Engine
QA Contact: rginda → pschwartau

Comment 3

18 years ago
cc'ing Brendan, Patrick, Rob for their opinions on this - and in case
they know any specific doc or URL that explains this issue correctly. 
OS: Windows 98 → All
(Reporter)

Comment 4

18 years ago
I found a way to define a getter in Mozilla without producing a warning by 
searching Google for "HTMLElement.prototype".

produces a warning:
HTMLElement.prototype.ih getter = function (str) { return "*" + this.innerHTML 
+ "*"; }

doesn't produce a warning:
HTMLElement.prototype.__defineGetter__("ih", function () { return "*" + 
this.innerHTML + "*"; } )

Are either of these methods standard, or are they both specific to Mozilla?
http://www.mozilla.org/js/js15.html has pointers, but the google (originally,
deja) links are dangling, sort of.  Rob, endico: do we have more such on the
www.mozilla.org site?

I think the thread discussing this getter/setter change is now at
http://groups.google.com/groups?hl=en&lr=&safe=off&th=ddf42c2092335418&ic=1

/be

Updated

13 years ago
Assignee: rogerl → general
QA Contact: pschwartau → general
Support for the "x getter = function() {}" syntax was removed in bug 517580, so let's close this.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.