Labs/Jetpack/Binary Components: Difference between revisions

From MozillaWiki
< Labs‎ | Jetpack
Jump to navigation Jump to search
(Added API section)
(Redirect to memory profiler page)
 
(30 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= nsJetpack =
#REDIRECT [[Labs/Memory_Profiler]]
 
<code>nsJetpack</code> is a binary component used to provide services to Jetpack that aren't otherwise available to scripted chrome code in the Mozilla platform.
 
== Accessing the Component ==
 
Because the goal of <code>nsJetpack</code> is to provide functionality to scripted code, and because much of its functionality is concerned with providing access to SpiderMonkey internals, the XPCOM interface for the component is rather [http://hg.mozilla.org/labs/jetpack/file/tip/components/public/nsIJetpack.idl trivial].  To obtain the component, simply do:
 
  var nsJetpack = Cc["@labs.mozilla.com/jetpackdi;1"]
                  .createInstance(Ci.nsIJetpack).get();
 
This will give you the <code>nsJetpack</code> native JavaScript object, which provides access to all the component's functionality.
 
== API ==
 
=== nsJetpack.wrap() ===
 
=== nsJetpack.unwrap() ===
 
=== nsJetpack.getWrapper() ===
 
=== nsJetpack.profileMemory() ===
 
=== nsJetpack.functionInfo() ===
 
=== nsJetpack.seal() ===

Latest revision as of 22:09, 22 April 2010