Table of contents
- 1. Method overview
- 2. Attributes
- 3. Constants
- 4. Methods
- 5. Example
- 6. See also
Provides information about the XUL runtime to allow extensions and XUL applications to determine information about the XUL runtime.
1.0
9.0
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();
Requires Gecko 2.0
|
Attributes
| Attribute | Type | Description |
inSafeMode | boolean | Whether the application was launched in safe mode. 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. |
processType | unsigned long | The type of the caller's process. Returns one of process type constants. Read only. Requires Gecko 2 |
widgetToolkit | AUTF8String | A string tag identifying the target widget toolkit in use. This is taken from the MOZ_WIDGET_TOOLKIT configure variable. Read only. Requires Gecko 1.9.2 |
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 withOS. May throw |
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
Requires Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
invalidateCachesOnRestart()
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.

