Hello, after changing unsafeWindow rules some scripts stop work. I have
this situation:
- som page use jQ library by script tag
- from GM script I want get access to this jQuery in page and invoke ajax()
method
Before change (older GM and Firefox) I use sth like this:
<pre>
unsafeWindow["$"]["ajax"]({
"url": "someURL",
"success": function(result) {
alert(result["test1"] + result["test2"]);
},
"dataType": "json"
});
</pre>
and all works fine. Now I get "access denited" info because use object as
argument. So in next step I try this:
<pre>
unsafeWindow["$"]["ajax"](cloneInto({
"url": "someURL",
"success": function(result) {
alert(result["test1"] + result["test2"]);
},
"dataType": "json"
}, unsafeWindow));
</pre>
When cloning simple object doesn't have problem, but in this code problem
make:
<pre>"success": function(result) {
alert(result["test1"] + result["test2"]);
}</pre>
and generate error:
"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE)
[nsIXPCComponents_Utils.cloneInto]"
When delete this method don't get any error. So how can I define this
success method in GM side when jQ is defined in page side and make all
works?
--
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/greasemonkey-users.
For more options, visit https://groups.google.com/d/optout.