Opened 14 years ago
Closed 12 years ago
#4151 closed enhancement (wontfix)
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: |
Description
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?
Change History (4)
comment:1 Changed 14 years ago by
Milestone: | 1.3.2 → 1.3.3 |
---|
comment:2 Changed 13 years ago by
comment:3 Changed 12 years ago by
Keywords: | needsreview added |
---|---|
Milestone: | 1.4 |
Status: | new → open |
comment:4 Changed 12 years ago by
Resolution: | → wontfix |
---|---|
Status: | open → closed |
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.
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 usingdispatchEvent()
for triggering an event:var evt = document.createEvent("HTMLEvents");
evt.initEvent('focus', true, true);
$('div#bla')[0].dispatchEvent(evt);