We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

Archive of obsolete content

Specifying Startup Chrome Window

Main Chrome Window

In order to specify the main chrome window of your XULRunner application, you'll need to add a preferences file to your application directory structure and add a preference named toolkit.defaultChromeURI to that file.

Let's look at the xulmine XULRunner application. It's directory structure is as follows:


In defaults/preferences, there is a file named xulmine.js. Its contents are:

pref("toolkit.defaultChromeURI", "chrome://xulmine/content/xulmine.xul");

The toolkit.defaultChromeURI preference specifies that the XUL window at chrome://xulmine/content/xulmine.xul is the main application window.

Specifying a Single Instance Main Window

By default, each time the user launches the application XULRunner opens the window specified by toolkit.defaultChromeURI. An application wishing to have only one main window should set the toolkit.singletonWindowType preference and specify the windowtype attribute on the main application window.

Specifying Window Features

By default, the main window is opened as a resizeable, non-dialog chrome window. This default can be changed by setting the toolkit.defaultChromeFeatures preference.

Document Tags and Contributors

Last updated by: SphinxKnight,