Components.utils
From MDC
Components.utils is a collection of various useful XPConnect features. Its interface is defined at js/src/xpconnect/idl/xpccomponents.idl. The object currently has the following members:
| Property | Description |
|---|---|
evalInSandbox |
Runs JavaScript code in a sandbox, usually used to run code with restricted privileges. |
forceGC |
Requires Gecko 1.9 Forces a garbage collection cycle. |
getWeakReference |
Requires Gecko 1.9 Gets a weak reference for the object passed in. |
import |
Requires Gecko 1.9 Loads a JS module into the current script, without sharing a scope. |
lookupMethod |
Looks up a native (i.e. declared in the interface) method or property of an XPCOM object. Serves the same purpose as XPCNativeWrapper. |
reportError |
Reports a JavaScript Error object to the Error Console. |
Sandbox |
Creates sandbox objects for use with evalInSandbox. |