> I downloaded and installed NN4.7 and the privileges seem
> to be working fine. Is this an issue with Mozilla or has
> the privilege ("UniversalBrowserAccess") been removed or
> renamed?

Mozilla doesn't know about UniversalBrowserAccess.  I don't know if it 
was intentionally removed or just got lost in the rewrite. 
UniversalBrowserAccess is mentioned on 
http://www.mozilla.org/projects/security/components/signed-scripts.html, 
which is wrong if it was removed intentionally.

You can call enablePrivilege("UniversalBrowserRead 
UniversalBrowserWrite") for the same effect.  (Note the trick of asking 
for both privs in one call to enablePrivilege: this reduces the number 
of dialogs you have to click "yes" to.)


Here's a working demo of UniversalBrowserRead + UniversalBrowserWrite:

<HTML>
<head>
<SCRIPT LANGUAGE="JavaScript">
function checkForm()
{
   try
   {
 
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead 
UniversalBrowserWrite");
     alert(oneWind.document.forms[0].q.value);
     oneWind.document.forms[0].q.value = "value set by script";
   }
   catch(er)
   {
     alert(er);
   }
}
</SCRIPT>
</head>
<body>
<FORM>
     <input type="button" value="open google" 
onclick='oneWind=window.open("http://www.google.com.pl","oneWind";)'>
     <INPUT TYPE="Button" NAME="Go" Value="Show Form" onClick="checkForm()">
</FORM>
</body>
</HTML>


Reply via email to