Closed Bug 292625 Opened 21 years ago Closed 21 years ago

__defineGetter__ on Event fails in 1.0.3

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 290777

People

(Reporter: ceubanks, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 8.0 Build Identifier: 1.0.3 I have IE compatibility code that uses __defineGetter__ on Event this code is broken in 1.0.3. I have quite bit of this sort of code (on things other than Event as well) so I am looking to understand: A) Was this intentionally changed? (I couldn't see anything explicit in the rel notes and from my reading of the related bugs (289074 & 289083?) it doesn't seem like they should disable this) B) And if this is really correct then what is the complete nature of the nerfing? I am trying to figure out what exactly I need to change in my code to fix this. On 1.0.3 the following example shows Error: uncaught exception: [Exception... "Illegal operation on WrappedNative prototype object" nsresult: "0x8057000c (NS_ERROR_XPC_BAD_OP_ON_WN_PROTO)" location: "JS frame :: http://localhost:8080/ test/ffbugs/bug1.html :: anonymous :: line 5" data: no] in the console <html> <head> <script type="text/javascript"> Event.prototype.__defineGetter__("srcElement", function () { return this.target; }); function doOnCtxt(event){ window.alert(event.srcElement.tagName); } </script> </head> <body> <div style="height:500px;width:500px;position:relative;background-color:blue; color:red" oncontextmenu="doOnCtxt(event);return false;"> right click me! </div> </body> </html> Reproducible: Always Steps to Reproduce: 1. run the attached html 2. right click. Actual Results: nothing. Expected Results: alert should pop up
Attached file testcase
Keywords: testcase
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
Component: DOM: Mozilla Extensions → DOM
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: