How to add extra property to window object

2006-01-08 Thread David Huynh

Hi all,

I'm trying to write a Firefox extension that adds an extra property to 
the window object that Web pages' scripts have access to. As you know, 
currently, scripts in Web pages can access such objects as


window
window.document
window.navigator
window.netscape
...

I'd like to add my own property onto this window object that all Web 
pages' scripts can access


window.foo

I will provide the implementation of foo as necessary. I'm hoping that 
someone here can tell me how to do this. I've tried a number of methods 
(such as overloading the browser XBL binding), but I don't see how to 
do this cleanly from within an extension.


(The major issue is probably security, hence, my posting here.)

Many thanks in advance!

David
___
Mozilla-security mailing list
Mozilla-security@mozilla.org
http://mail.mozilla.org/listinfo/mozilla-security


PropertyPermission denied

2004-11-23 Thread David Huynh
Hi, if my javascript generates the following exception:
	java.security.AccessControlException: access denied 
(java.util.PropertyPermission java.io.tmpdir read)

which privilege should I ask for? I've already tried:
netscape.security.PrivilegeManager.enablePrivilege(UniversalXPConnect 
UniversalFileRead UniversalBrowserWrite UniversalBrowserRead 
CapabilityPreferencesAccess);

My script is calling the Jena JAR to create an file-based RDF model in 
the directory C:\MyData.

Thanks.
David
___
Mozilla-security mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-security