Skip to main content

Bug Tracker

Side navigation

#4151 closed enhancement (wontfix)

Opened February 14, 2009 03:22PM UTC

Closed April 16, 2011 09:20PM UTC

Use in Environments that Don't Support Expandos

Reported by: john Owned by:
Priority: major Milestone:
Component: core Version: 1.3.1
Keywords: needsreview Cc:
Blocked by: Blocking:

From the jquery-dev list:

does anybody have any experience/success with running jQuery inside a

Mozilla Firefox sandbox, in which the global window object is a deep

XPCNativeWrapper of the underlying DOM?

In this environment, 'expando' properties - e.g., properties not

defined by W3C DOM may be added only to 'window' and 'document', but

not to any other DOM element. For example, the following code:

document.expando = 'Hello';

document.body.expando = 'World';

alert(document.expando + ' ' + document.body.expando);

would alert 'Hello undefined'.

Is it possible to use jQuery if DOM elements do not support expando properties?

Attachments (0)
Change History (4)

Changed July 15, 2009 08:59AM UTC by yehuda comment:1


Changed September 07, 2009 10:21PM UTC by yacoob comment:2

This feature is relevant for anyone that wants to write Greasemonkey script including jQuery.

As of 1.3.2, the support seems to be partial. Inside a GM script, I was able to set an event handler via .focus(function() {...}) but I wasn't able to trigger an event via .focus(). I've ended up using dispatchEvent() for triggering an event:

var evt = document.createEvent("HTMLEvents");

evt.initEvent('focus', true, true);


Changed November 19, 2010 01:22AM UTC by dmethvin comment:3

keywords: → needsreview
milestone: 1.4
status: newopen

Changed April 16, 2011 09:20PM UTC by john comment:4

resolution: → wontfix
status: openclosed

I don't think that this is something that we're going to be able to reasonably implement - expandos are a rather critical part of having jQuery work with DOM nodes.