To make the XUL Browser to open popup window you have to set the following priviledge in the prefs.js
( Which is in Corresponding application folder of Application Support folder ).
netscape.security.PrivilegeManager.enablePrivilege(“UniversalXPConnect UniversalBrowserWrite”);
You can program it like the following one.
var prefManager = Components.classes[“@mozilla.org/preferences-service;1”]
.getService(Components.interfaces.nsIPrefBranch);
prefManager.setCharPref(“capability.principal.codebase.p0.granted”,”UniversalXPConnect UniversalBrowserWrite”);
prefManager.setCharPref(“capability.principal.codebase.p0.id”,”http://localhost”);
technorati tags:mozilla, xul, browser, priviledges, nsIPrefBranch, popup, window
Blogged with Flock
June 4, 2009 at 8:17 am
Hi
Praveenmatanam,
Currently iam working on customized Xul based browser, and for remote websites opened through this browser not opening popup windows. So i added this above code in prefs.js , but still no change. Is there anything else i need to do or help me in doing best.
Thanks & Regards
Satya
June 4, 2009 at 11:23 am
and i would like to expect the solution as soon as Possible . Thank you.
November 30, 2009 at 5:16 am
same problem here, how do we filter window.open, href=”_blank”?
I think there’s more to this than that code alone…
July 22, 2010 at 7:13 pm
Too bad things are like they are right now. I want things to change this November. They will if we do what we need to do.
November 26, 2010 at 11:25 am
This solution is not working. Maybe is out of date with some Xulrunner update.