[Greasemonkey] sandboxCtor
Travis Choma
travischoma at gmail.com
Fri Oct 7 13:55:39 EDT 2005
Hello,
I wanted to turn one of my greasemonkey scripts into an extension but still
be able to use the GM api to make xmlhttpRequests outside the current
domain.
So i took the downloaded the latest CVS snapshot and striped it down to the
essentials (modified versions of Browser.js,DocHandlers.js,
xmlhttpRequester.js,Utils.js).
However I get an unexpected error from this line:
var sandbox = new this.sandboxCtor();
I checked and the reference has already been snarfed, if I printout
this.sandboxCtor it is of the following type:
function XPCNativeWrapper function wrapper() {
[native code]
}
Now if I change the line to: var sandbox = this.sandboxCtor everything
proceeds fine but I then I get unexpected
errors in the injected script (when creating new Objects and calling GM api
functions).
Any ideas why constructing the new sandbox object fail? I am running firefox
1.5b1. Is this a known problem?
Best regards,
-Travis
More information about the Greasemonkey
mailing list