FUEL

  • Revision slug: Toolkit_API/FUEL
  • Revision title: FUEL
  • Revision id: 13110
  • Created:
  • Creator: jenzed
  • Is current revision? No
  • Comment 19 words added, 2 words removed

Revision Content

{{ Fx_minversion_header("3") }} FUEL is a JavaScript library designed to help developers build extensions using terminology and interfaces that are familiar to them. FUEL is new in Firefox 3.

FUEL is about making it easier for extension developers to be productive, by minimizing some of the XPCOM formality and adding some "modern" JavaScript ideas. We want to start with areas that will provide the most benefit.

FUEL has a fuelIApplication interface that implements all the functions of extIApplication. The library has also been implemented in Thunderbird ("STEEL") and in SeaMonkey ("SMILE").

Objects

extIApplication Objects

fuelIApplication Objects

XPCOM

Although the FUEL Application object is preloaded into XUL scripts, it is not preloaded into JavaScript XPCOM code. The object needs to be accessed like any other XPCOM service:

var Application = Components.classes["@mozilla.org/fuel/application;1"].getService(Components.interfaces.fuelIApplication);

{{ languages( { "es": "es/FUEL", "fr": "fr/FUEL", "ja": "ja/FUEL" } ) }}

Revision Source

<p>{{ Fx_minversion_header("3") }} FUEL is a JavaScript library designed to help developers build extensions using terminology and interfaces that are familiar to them. FUEL is new in Firefox 3.</p>
<p>FUEL is about making it easier for extension developers to be productive, by minimizing some of the XPCOM formality and adding some "modern" JavaScript ideas. We want to start with areas that will provide the most benefit.</p>
<p>FUEL has a <code><span class="lang lang-en"><a class=" external" href="http://mxr.mozilla.org/comm-central/source/mozilla/browser/fuel/public/fuelIApplication.idl" rel="external nofollow" target="_blank" title="http://mxr.mozilla.org/comm-central/source/mozilla/browser/fuel/public/fuelIApplication.idl">fuelIApplication</a> </span></code> interface that implements all the functions of <code><span class="lang lang-en"><a class=" external" href="http://mxr.mozilla.org/comm-central/source/mozilla/toolkit/components/exthelper/extIApplication.idl" rel="external nofollow" target="_blank" title="http://mxr.mozilla.org/comm-central/source/mozilla/toolkit/components/exthelper/extIApplication.idl">extIApplication</a></span></code>. The library has also been implemented in Thunderbird ("<a class="internal" href="/en/Thunderbird/STEEL" title="en/Thunderbird/STEEL">STEEL</a>") and in SeaMonkey ("<a class="internal" href="/en/SeaMonkey/SMILE" title="en/SeaMonkey/SMILE">SMILE</a>").</p>
<h3 name="Objects">Objects</h3>
<h4>extIApplication Objects</h4>
<ul> <li><a href="/en/FUEL/Console" title="en/FUEL/Console"> Console</a></li> <li><a href="/en/FUEL/EventItem" title="en/FUEL/EventItem"> EventItem</a></li> <li><a href="/en/FUEL/EventListener" title="en/FUEL/EventListener"> EventListener</a></li> <li><a href="/en/FUEL/Events" title="en/FUEL/Events"> Events</a></li> <li><a href="/en/FUEL/Extension" title="en/FUEL/Extension"> Extension</a></li> <li><a href="/en/FUEL/Extensions" title="en/FUEL/Extensions"> Extensions</a></li> <li><a href="/en/FUEL/Preference" title="en/FUEL/Preference"> Preference</a></li> <li><a href="/en/FUEL/PreferenceBranch" title="en/FUEL/PreferenceBranch"> PreferenceBranch</a></li> <li><a href="/en/FUEL/SessionStorage" title="en/FUEL/SessionStorage"> SessionStorage</a></li>
</ul>
<h4>fuelIApplication Objects</h4>
<ul> <li><a href="/en/FUEL/Annotations" title="en/FUEL/Annotations">Annotations</a></li> <li><a href="/en/FUEL/Application" title="en/FUEL/Application">Application</a></li> <li><a href="/en/FUEL/Bookmark" title="en/FUEL/Bookmark">Bookmark</a></li> <li><a href="/en/FUEL/BookmarkFolder" title="en/FUEL/BookmarkFolder"> BookmarkFolder</a></li> <li><a href="/en/FUEL/BookmarkRoots" title="en/FUEL/BookmarkRoots">BookmarkRoots</a></li> <li><a href="/en/FUEL/BrowserTab" title="en/FUEL/BrowserTab">BrowserTab</a></li> <li><a href="/en/FUEL/Window" title="en/FUEL/Window">Window</a></li>
</ul>
<h3 name="XPCOM">XPCOM</h3>
<p>Although the FUEL <a href="/en/FUEL/Application" title="en/FUEL/Application"> Application</a> object is preloaded into XUL scripts, it is not preloaded into JavaScript XPCOM code. The object needs to be accessed like any other XPCOM service:</p>
<pre>var Application = Components.classes["@mozilla.org/fuel/application;1"].getService(Components.interfaces.fuelIApplication);
</pre>
<p>{{ languages( { "es": "es/FUEL", "fr": "fr/FUEL", "ja": "ja/FUEL" } ) }}</p>
Revert to this revision