Hello,
I'm so very close... Please help...
I have a signed javascript which attempts to instantiate an XPCOM plugin and
access some properties and call some methods. I signed the script with
signtool (and verified the sig) and I put the script and the jar on the same
server in the same directory. Here is the relevant HTML:
<SCRIPT ARCHIVE="priv.jar" ID=1 src="priv.js"></script>
here is the javascript in priv.js:
function SetPriv()
{
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var sample = Components.classes["@mozilla.org/XPWAS;1"].createInstance();
sample = sample.QueryInterface(Components.interfaces.nsIXPWAS);
sample.Realm = "Web Auth"
alert(sample.Realm);
}
When I call SetPriv(), I get an error "Error: uncaught exception:
enablePrivilege not granted"...
If I take out the call to enable the privilege, I can't access the
property... This runs fine when everything is on my local machine. What do I
need to do to get this to work from the server?
TIA,
Steven