Closed
Bug 71639
Opened 24 years ago
Closed 23 years ago
Defining a getter does not work
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
mozilla1.0
People
(Reporter: erik, Assigned: jst)
Details
(Whiteboard: [XPCDOM])
Attachments
(1 file)
326 bytes,
text/html
|
Details |
I'm trying to define a getter on the prototype of HTMLElement but the getter is never (well sometimes, ~1/10 tries) added. HTMLElement.prototype.__defineGetter__("all", function () { return "Wow it worked this time"; }); And then alert(document.body.all) gives undefined. Using: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; 0.8.1) Gecko/20010310
Reporter | ||
Comment 1•24 years ago
|
||
Comment 2•24 years ago
|
||
I made some tests with a user defined object and with the Date object and getters worked as expected. So it seems there is a problem with assigning getters to DOM objects.
This is jst's bug. We discussed this a few weeks ago, as I recall.
Assignee: rogerl → jst
Component: Javascript Engine → DOM Other
Comment 4•24 years ago
|
||
What's going wrong, in brief? Maybe I could help hack a fix? /be
Assignee | ||
Comment 5•23 years ago
|
||
Setting to mozilla1.0 for now, I bet this will change (for better or worse) once the DOM uses XPConnect.
OS: Windows 2000 → All
Hardware: PC → All
Whiteboard: [XPCDOM]
Target Milestone: --- → mozilla1.0
Updated•23 years ago
|
Component: DOM Other → DOM Level 1
Assignee | ||
Comment 6•23 years ago
|
||
*** This bug has been marked as a duplicate of 83433 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•