FF4 unsafeWindow.xxx.prototype #1320

Closed
simonzack opened this Issue Mar 26, 2011 · 13 comments

Projects

None yet

5 participants

@simonzack

returns undefined in firefox 4, works in ff3.6

@arantius
Collaborator

A lot more details would be really helpful.

@arantius
Collaborator

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.

http://wiki.greasespot.net/Category:Coding_Tips:Interacting_With_The_Page

@simonzack

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

http://wiki.greasespot.net/Category:Coding_Tips:Interacting_With_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
@simonzack

pressed comment and close by accident please reopen it :p

@sizzlemctwizzle
Contributor

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

@simonzack

to hook google's ajax request without using document.NodeInserted
http://userscripts.org/scripts/review/39996

@simonzack simonzack reopened this Apr 14, 2011
@arantius
Collaborator

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

@arantius
Collaborator
arantius commented May 2, 2011

Reported upstream, as I think that's where the problem is:
https://bugzilla.mozilla.org/show_bug.cgi?id=654286

@GIJoe
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
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
Collaborator
arantius commented Oct 2, 2012

https://bugzilla.mozilla.org/show_bug.cgi?id=654286#c3

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

@janekptacijarabaci
Contributor

Confirmed on:
Firefox 20.0-

Not confirmed on:
Firefox 21.0+

@arantius
Collaborator
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