Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Provides information about the XUL runtime to allow extensions and XUL applications to determine information about the XUL runtime.
1.0
38.0.5
Introduced
Gecko 1.8
Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)

Implemented by: @mozilla.org/xre/app-info;1. To get an instance, use:

var xulRuntime = Components.classes["@mozilla.org/xre/app-info;1"]
                 .getService(Components.interfaces.nsIXULRuntime);

Method overview

void invalidateCachesOnRestart();

Attributes

Attribute Type Description
accessibilityEnabled boolean If true, the accessibility service is running. Read only.
browserTabsRemoteAutostart boolean If true, browser tabs may be opened by default in a different process from the main browser UI. Read only.
inSafeMode boolean

Whether the application was launched in safe mode. Read only.

is64Bit boolean Indicates whether the current Firefox build is 64-bit. Read only.
logConsoleErrors boolean Whether to write console errors to a log file. If a component encounters startup errors that might prevent the app from showing proper UI, it should set this flag to true.
OS AUTF8String A string tag identifying the current operating system. This is taken from the OS_TARGET configure variable. It will always be available. Read only.
processID unsigned long The system process ID of the caller's process. Read only.
processType unsigned long The type of the caller's process. Returns one of process type constants. Read only.
widgetToolkit AUTF8String A string tag identifying the target widget toolkit in use. This is taken from the MOZ_WIDGET_TOOLKIT configure variable. Read only.
XPCOMABI AUTF8String

A string tag identifying the binary ABI of the current processor and compiler vtable. This is taken from the TARGET_XPCOM_ABI configure variable. It may not be available on all platforms, especially unusual processor or compiler combinations.

The result takes the form <processor>-<compilerABI>, for example: x86-msvc ppc-gcc3.

This value should almost always be used in combination with OS.

May throw NS_ERROR_NOT_AVAILABLE.

Read only.

Constants

Process type constants

Constant Value Description
PROCESS_TYPE_DEFAULT 0 The default (chrome) process.
PROCESS_TYPE_PLUGIN 1 A plugin subprocess.
PROCESS_TYPE_CONTENT 2 A content subprocess.
PROCESS_TYPE_IPDLUNITTEST 3 IPDL unit testing subprocess.

Methods

invalidateCachesOnRestart()

Requires Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)

Signal the apprunner to invalidate caches on the next restart. This will cause components to be auto registered and all fast load data to be re-created.

void invalidateCachesOnRestart();
Parameters

None.

Example

Display the user's operating system in an alert box:

var xulRuntime = Components.classes["@mozilla.org/xre/app-info;1"]
                           .getService(Components.interfaces.nsIXULRuntime);
alert(xulRuntime.OS);

See also

  • nsIXULAppInfo - a related interface providing information about the host application, it's also implemented by xre/app-info.

Document Tags and Contributors

 Contributors to this page: amccreight, evold, Sheppy, Mook(as), trevorh, Smi, Nickolay, Mossop, Harobed, The Hunter
 Last updated by: amccreight,