Hi,
I had written, with greasemonkey 0.7 and firefox 2, a greasemonkey
script that uses the following code to copy content to the clipboard :
"
unsafeWindow.netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
const gClipboardHelper = Components.classes["@mozilla.org/widget/
clipboardhelper;1"].
getService(Components.interfaces.nsIClipboardHelper);
gClipboardHelper.copyString(texte);
"
It was working perfectly well but when I tried it with Firefox 3 and
greasemonkey 0.8, it does not work anymore and fails with the error :
"Permission denied to get property XPCComponents.classes".
I tried the code "var Cc = Components.classes;" or "var Cc =
unsafeWindow.Components.classes;" and it fails systematically with
this permission error.
I tried also to use same javascript code out of Greasemonkey (directly
in a web page) and it works perfectly well on firefox 3.
I am not able to say if it is a problem caused by Greasemonkey usage
of XPCNativeWrapper or if it is the implementation of XPCNativeWrapper
that forces this security restriction.
After searching a lot on the web, I did not find any explanation of
this behaviour nor any solution.
Does anyone has an idea to solve it ?
Thanks,
Nicolas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/greasemonkey-users?hl=en
-~----------~----~----~----~------~----~------~--~---