mozilla

Revision 60350 of Components.utils

  • Revision slug: Components.utils
  • Revision title: Components.utils
  • Revision id: 60350
  • Created:
  • Creator: Mgjbot
  • Is current revision? No
  • Comment robot Adding: ja

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:

</td> <tr> <td>Sandbox</td> <td>Creates sandbox objects for use with evalInSandbox.</td>

<tr> <td>evalInSandbox</td> <td>Runs JavaScript code in a sandbox, usually used to run code with restricted privileges.</td> </tr> </table>
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.
{{ wiki.languages( { "ja": "ja/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>
<p>&lt;/td&gt;
&lt;tr&gt;
&lt;td&gt;<a href="en/Components.utils.Sandbox">Sandbox</a>&lt;/td&gt;
&lt;td&gt;Creates sandbox objects for use with <code>evalInSandbox</code>.&lt;/td&gt;
</p>
&lt;tr&gt;
&lt;td&gt;<a href="en/Components.utils.evalInSandbox">evalInSandbox</a>&lt;/td&gt;
&lt;td&gt;Runs JavaScript code in a sandbox, usually used to run code with restricted privileges.&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
<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></tbody></table>{{ wiki.languages( { "ja": "ja/Components.utils" } ) }}
Revert to this revision