mozilla

Revision 43042 of Components.utils.Sandbox

  • Revision slug: Components.utils.Sandbox
  • Revision title: Components.utils.Sandbox
  • Revision id: 43042
  • Created:
  • Creator: Rcampbell
  • Is current revision? No
  • Comment updated link to source; no wording changes

Revision Content

 

Components.utils.Sandbox is used to create a sandbox object for use by evalInSandbox. See that page for more details and examples.

Available Sandbox functions:

dump() - Similar to window.dump().
debug()
importFunction() - Allows for the secure importing of chrome functions into the Sandbox context.  For an example of its use, see nsProxyAutoConfig.js.

For more information on the built-in Sandbox functions, please consult the source code.

{{ languages( { "pl": "pl/Components.utils.Sandbox" } ) }}

Revision Source

<p> </p>
<p><code>Components.utils.Sandbox</code> is used to create a sandbox object for use by <a href="/en/Components.utils.evalInSandbox" title="en/Components.utils.evalInSandbox">evalInSandbox</a>. See that page for more details and examples.</p>
<p>Available Sandbox functions:</p>
<p style="margin-left: 40px;"><code>dump()</code> - Similar to <a class="internal" href="/en/DOM/window.dump" title="En/DOM/Window.dump">window.dump()</a>.<br>
<code>debug()</code><br>
<code>importFunction()</code> - Allows for the secure importing of chrome functions into the Sandbox context.  For an example of its use, see <a class="external" href="http://mxr.mozilla.org/mozilla/source/netwerk/base/src/nsProxyAutoConfig.js" title="http://mxr.mozilla.org/mozilla/source/netwerk/base/src/nsProxyAutoConfig.js">nsProxyAutoConfig.js</a>.</p>
<p>For more information on the built-in Sandbox functions, please consult <a class="external" href="http://mxr.mozilla.org/mozilla-central/source/js/src/xpconnect/src/xpccomponents.cpp" title="http://mxr.mozilla.org/mozilla-central/source/js/src/xpconnect/src/xpccomponents.cpp">the source code</a>.</p>
<p>{{ languages( { "pl": "pl/Components.utils.Sandbox" } ) }}</p>
Revert to this revision