Sina Nouri
Sina Nouri

Reputation: 341

XULRUNNER open in new window

I'm about to make a browser-like program for my company using XULRunner. I'm having a problem when I click the links (which I'm expecting should open in new windows) XULRunner disappears while it is still running in background. Here is my code - I don't know what the problem is, can anybody help?

main.xul

<?xml version="1.0"?>

<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>

<window id="main" title="My App" width="500" height="500" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<groupbox flex="1">
  <caption label="Mozilla homepage"/>
  <browser type="content" src="http://www.test.com" flex="1"/>
</groupbox>
  
</window>

pref.js

pref("toolkit.defaultChromeURI", "chrome://myapp/content/main.xul");
pref("toolkit.defaultChromeFeatures", "chrome,dialog=no,all");
 pref("toolkit.singletonWindowType", "xulmine");

/* debugging prefs, disable these before you deploy your application! */
pref("browser.dom.window.dump.enabled", true);
pref("javascript.options.showInConsole", true);
pref("javascript.options.strict", true);
pref("nglayout.debug.disable_xul_cache", true);
pref("nglayout.debug.disable_xul_fastload", true);

Upvotes: 1

Views: 331

Answers (1)

Sina Nouri
Sina Nouri

Reputation: 341

I ended up finding the answer on my own. I just needed to add the following:

pref("browser.chromeURL", "chrome://myapp/content/myapp.xul");

Upvotes: 1

Related Questions