Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

FF4 unsafeWindow.xxx.prototype #1320

Open
simonzack opened this Issue · 11 comments

4 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
@simonzack

pressed comment and close by accident please reopen it :p

@sizzlemctwizzle

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

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

@arantius
Collaborator

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

@GIJoe

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

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

@arantius
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.