Closed Bug 500364 Opened 15 years ago Closed 15 years ago

"Cannot convert WrappedNative to function" in mootools event code

Categories

(Core :: DOM: Events, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 499777

People

(Reporter: jruderman, Unassigned)

Details

(Keywords: regression)

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090622 Firefox/3.6a1pre

Steps:
1. Load http://www.gametreeonline.com/merscom/hospital-hustle/
2. Click the first screenshot.
3. Click "next" at the bottom of the screenshot box.

Result: about 50% of the time, I am taken to the front page of the site!

This happens because of three things:

1) Base href.
2) Link points to "#".
3) Event handler throws:

Error: uncaught exception: [Exception... "Cannot convert WrappedNative to function"  nsresult: "0x8057000d (NS_ERROR_XPC_CANT_CONVERT_WN_TO_FUN)"  location: "JS frame :: http://www.gametreeonline.com/skin1/js/mootools-1.2.1-core-nc.js :: anonymous :: line 1964"  data: no]

1964        event = new Event(event, self.getWindow());

So, why does the event handler throw -- and why only sometimes and only on trunk (not 1.9.1)?
Mardak, you enjoy reducing mootools code, right? ;)
Whiteboard: [needs reduction (mootools event handling code)]
Isn't this a dupe of bug 499777?
Whiteboard: [needs reduction (mootools event handling code)] → [needs retesting (jesse)]
Thanks, peterv.  Works fine after rebuilding.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
Whiteboard: [needs retesting (jesse)]
You need to log in before you can comment on or make changes to this bug.