Skip to main content

Bug Tracker

Side navigation

#7785 closed bug (wontfix)

Opened December 15, 2010 12:10PM UTC

Closed December 27, 2010 06:20AM UTC

Last modified March 14, 2012 01:02AM UTC

jQuery throws exception if used inside an extension in FF4

Reported by: evgeny.shadchnev@gmail.com Owned by:
Priority: undecided Milestone: 1.6
Component: unfiled Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:
Description

If jQuery is used as a part of a browser extension in Firefox, it will work for FF3 but not necessarily in FF4. In particular, when jQuery is loaded using loadSubScript() passing a wrappedJSObject as a context, it will throw an exception in eventSupported():

"Component is not available" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"

FF4 throws this exception if the event that is being checked is not supported on these lines:

var isSupported = (eventName in el);

isSupported = typeof el[eventName] === "function";

This problem seems to be specific to loading jQuery using loadSubScript() since I cannot reproduce it in the console.

A workaround is a simple try/catch block but there must be a better solution. I've seen this behaviour on 1.4.2, 1.4.4 and on the 1.4.5pre.

A test case is here: https://github.com/shadchnev/jquery-exception-testcase

Attachments (0)
Change History (1)

Changed December 27, 2010 06:20AM UTC by snover comment:1

resolution: → wontfix
status: newclosed

We don’t fix bugs in beta browsers; too much of a moving target. Please reopen if this is still an issue when Fx4 final is released.