[Project_owners] Security Privileges of XHTML run under Chrome

Oren Nachman oren at nachmore.com
Sat Jun 18 23:19:54 EDT 2005


Hi,

Running into some problems here... some of my windows are xhtml files 
(as opposed to .xul). When trying to get them to run functions that 
require greater security they fail, and trying

netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");

fails with an access denied error. These same functions run smoothly 
when executed from XUL files that are opened in the same was as the 
xhtml pages, "even" when they are children of those XHTML files. An 
example of something that fails is:

    var mozcdDirService = 
Components.classes['@mozilla.org/file/directory_service;1'].getService(Components.interfaces.nsIProperties);
    var mozcdFile = mozcdDirService.get('CurProcD', 
Components.interfaces.nsILocalFile);


Any help would be appreciated.

Thanks!

Oren Nachman


More information about the Project_owners mailing list