mozilla

Revision 60351 of Components.utils

  • Revision slug: Components.utils
  • Revision title: Components.utils
  • Revision id: 60351
  • Created:
  • Creator: Marcoos
  • Is current revision? No
  • Comment fix markup, add pl

Revision Content

Components.utils is a collection of various useful but non-essential XPConnect features. Its interface is defined at {{template.Source("js/src/xpconnect/idl/xpccomponents.idl")}}. The object currently has the following members:

Property Description
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 JavaScript Console.
Sandbox Creates sandbox objects for use with evalInSandbox.
evalInSandbox Runs JavaScript code in a sandbox, usually used to run code with restricted privileges.
{{ wiki.languages( { "ja": "ja/Components.utils", "pl": "pl/Components.utils" } ) }}

Revision Source

<p>
</p><p><code>Components.utils</code> is a collection of various useful but non-essential XPConnect features. Its interface is defined at {{template.Source("js/src/xpconnect/idl/xpccomponents.idl")}}. The object currently has the following members:
</p>
<table class="fullwidth-table">
<tbody><tr>
<th>Property</th>
<th>Description</th>
</tr>
<tr>
<td><a href="en/Components.utils.lookupMethod">lookupMethod</a></td>
<td>Looks up a native (i.e. declared in the interface) method or property of an XPCOM object. Serves the same purpose as <a href="en/XPCNativeWrapper">XPCNativeWrapper</a>.</td>
</tr>
<tr>
<td><a href="en/Components.utils.reportError">reportError</a></td>
<td>Reports a JavaScript Error object to the JavaScript Console.</td>
</tr><tr>
<td><a href="en/Components.utils.Sandbox">Sandbox</a></td>
<td>Creates sandbox objects for use with <code>evalInSandbox</code>.</td>
</tr>
<tr>
<td><a href="en/Components.utils.evalInSandbox">evalInSandbox</a></td>
<td>Runs JavaScript code in a sandbox, usually used to run code with restricted privileges.</td>
</tr>
</tbody></table>
{{ wiki.languages( { "ja": "ja/Components.utils", "pl": "pl/Components.utils" } ) }}
Revert to this revision