There's a prefs file for Chimera, called

    ~/Library/Application
Support/Chimera/Profiles/default/mfwxeb01.slt/prefs.js

This prefs file contains a few lines.  A test.html file of mine contains
JavaScript with:


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

When I first surfed to that page, a message box prompted me on this, and I
said "fine", of course, which resulted in a new line in my prefs.js file:

    user_pref("capability.principal.codebase.p0.granted",
"UniversalXPConnect");

Now, I'm attempting a test with the CocoaEmbed project.  The only
modification I made to this CocoaEmbed project was the addition of my XPCom
.dylib and .xpt files.  This component, by the way, loads successfully in
CocoaEmbed, as it did in the Chimera app.  However, when I surf to my
test.html file, I get the traceout:

    line 0: uncaught exception: enablePrivilege not granted

which is undoubtably referring to this netscape.security...enablePrivilege
line in the JS.

So, I attempt a few things:

1) Add the pref line, both w/ and w/o the user_ prefix, to the all.js file
in CocoaEmbed's Gecko/Gecko Defaults list.  No good.

2) Add prefs.js, complete with this line, to CocoaEmbed's Gecko/Gecko
Defaults list (add it also to the Copy-Files target in the project, of
course).  Also no good.

3) Try to find the prefs.js file for CocoaEmbed.  It's not in
~/Library/Application Support.  I searched all volumes and found these:

    ~/Library/Mozilla/Profiles/default/rwdin85m.slt/prefs.js

    ~/.mozilla/Profiles/default/l63od6n4.slt/prefs.js

Neither of which had any data.  However, filling these files out also made
no difference.

Therefore,

1) Can anyone suggest how to proceed.

2) My thought is that I may have to simply change this bit of code.
Ideally, it would look for the preference (file) correctly, etc.  But in the
meantime, I may just want to shunt the check.  Any idea where I could look
to do that?





Reply via email to