FF4 unsafeWindow.xxx.prototype #1320

simonzack opened this Issue Mar 26, 2011 · 13 comments


None yet
5 participants

returns undefined in firefox 4, works in ff3.6


arantius commented Mar 26, 2011

A lot more details would be really helpful.


arantius commented Mar 26, 2011

P.S. there is literally almost never a good reason to be using unsafeWindow. Run in the page and you don't have to deal with Greasemonkey's security restrictions.


in gm:
unsafeWindow.XMLHttpRequest.prototype==undefined: true
in page:
window.XMLHttpRequest.prototype==undefined: false

there is literally almost never a good reason to be using unsafeWindow

true in most cases, but I need to read/write scoped vars in the unsafe function which makes it a lot easier to run using unsafeWindow instead of in the page


I have already read this many times before, none of the workarounds help in my case

@simonzack simonzack closed this Mar 27, 2011

pressed comment and close by accident please reopen it :p


sizzlemctwizzle commented Mar 27, 2011

Why would you ever need to redefine the prototype of XMLHttpRequest in the page?

to hook google's ajax request without using document.NodeInserted

@simonzack simonzack reopened this Apr 14, 2011


arantius commented Apr 14, 2011

Marking this confirmed on the assumption that it is actually duped by #1326 which definitely is.


arantius commented May 2, 2011

Reported upstream, as I think that's where the problem is:

GIJoe commented May 15, 2011

This bug is annoying because i can't control flash object anymore in firefox4.

I use "unsafeWindow.document.getElementById(IdName);" to get the [object HTMLEmbedElement] in firefox3, but in firefox4, i get [object XrayWrapper [object HTMLEmbedElement]] that don't work.

Is there a way to control flash object in firefox4 that is not too slow ?

GIJoe commented May 24, 2011

Ok... i found that "window.document.getElementById(IdName).wrappedJSObject;" is the way to go to control the flash object.


arantius commented Oct 2, 2012


Looks like we can do this; we just haven't been doing it quite right until now.


janekptacijarabaci commented Jan 19, 2016

Confirmed on:
Firefox 20.0-

Not confirmed on:
Firefox 21.0+


arantius commented Aug 5, 2016

No detailed/clear STR but I believe this is indeed obsolete.

@arantius arantius closed this Aug 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment