extIApplication

  • Revision slug: Toolkit_API/extIApplication
  • Revision title: extIApplication
  • Revision id: 82759
  • Created:
  • Creator: Standard8
  • Is current revision? No
  • Comment Firefox -> Gecko minversion corrections; 8 words added, 8 words removed

Revision Content

{{ Fx_minversion_header("3") }}

{{ tb_minversion_header("3") }}

The extIApplication is defined in {{ source("toolkit/components/exthelper/extIApplication.idl") }}.

Implemented via XPCOM service for extIApplication: see the instructions on the FUEL (Firefox), STEEL (Thunderbird) and SMILE (SeaMonkey) pages.

Method overview

boolean quit() {{ gecko_minversion_inline("1") }}
boolean restart() {{ gecko_minversion_inline("1") }}

Attributes

The following interfaces are available to all applications:

Attribute Type Description
id readonly attribute AString The id of the application.
name readonly attribute AString The name of the application.
version readonly attribute AString The version number of the application.
console readonly attribute extIConsole The console object for the application.
extensions readonly attribute extIExtensions The extensions object for the application. Contains a list of all installed extensions.
prefs readonly attribute extIPreferenceBranch The preferences object for the application. Defaults to an empty root branch.
storage readonly attribute extISessionStorage The storage object for the application.
events readonly attribute extIEvents

The events object for the application. supports: "load", "ready", "quit", "unload"

The following interfaces are only available to Firefox:

Attribute Type Description
bookmarks readonly attribute fuelIBookmarkFolder The root bookmarks object for the application.
windows readonly attribute nsIVariant An array of browser windows within the application.
activeWindow readonly attribute fuelIWindow The currently active browser window.

Methods

quit() {{ gecko_minversion_inline("1") }}

Attempts to shutdown the application. It is possible for the shutdown to be canceled.

boolean quit()
Return value

boolean value indicating whether the shutdown was successful.

restart() {{ gecko_minversion_inline("1") }}

Attempts to restart the application. It is possible for the restart to be canceled.

boolean restart()
Return value

boolean value indicating whether the restart was successful.

XPCOM

Although the 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);

See also

FUEL (Firefox), STEEL (Thunderbird) and SMILE (SeaMonkey)

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

Revision Source

<p>{{ Fx_minversion_header("3") }}</p>
<p>{{ tb_minversion_header("3") }}</p>
<p>The <code>extIApplication</code> is defined in {{ source("toolkit/components/exthelper/extIApplication.idl") }}.</p>
<p>Implemented via XPCOM service for <a class="internal" href="/en/Toolkit_API/extIApplication" title="en/Toolkit API/extIApplication"><code>extIApplication</code></a>: see the instructions on the <a class="internal" href="/en/Toolkit_API/FUEL" title="en/FUEL">FUEL</a> (Firefox), <a class="internal" href="/en/Toolkit_API/STEEL" title="en/Thunderbird/STEEL">STEEL</a> (Thunderbird) and <a class="internal" href="/en/Toolkit_API/SMILE" title="en/SeaMonkey/SMILE">SMILE</a> (SeaMonkey) pages.</p>
<h2 name="Method_overview">Method overview</h2>
<table class="standard-table"> <tbody> <tr> <td><code>boolean <a href="#quit.28.29">quit</a>() {{ gecko_minversion_inline("1") }}<br> </code></td> </tr> <tr> <td><code>boolean <a href="#restart.28.29">restart</a>() {{ gecko_minversion_inline("1") }}<br> </code></td> </tr> </tbody>
</table>
<h2 name="Attributes">Attributes</h2>
<p>The following interfaces are available to all applications:</p>
<table class="standard-table"> <tbody> <tr> <td class="header">Attribute</td> <td class="header">Type</td> <td class="header">Description</td> </tr> <tr> <td><code>id</code></td> <td><code>readonly attribute AString</code></td> <td>The id of the application.</td> </tr> <tr> <td><code>name</code></td> <td><code>readonly attribute AString</code></td> <td>The name of the application.</td> </tr> <tr> <td><code>version</code></td> <td><code>readonly attribute AString</code></td> <td>The version number of the application.</td> </tr> <tr> <td><code>console</code></td> <td><code>readonly attribute <a href="/en/Toolkit_API/extIConsole" title="en/FUEL/Console">extIConsole</a></code></td> <td>The console object for the application.</td> </tr> <tr> <td><code>extensions</code></td> <td><code>readonly attribute <a href="/en/Toolkit_API/extIExtensions" title="en/FUEL/Extensions">extIExtensions</a></code></td> <td>The extensions object for the application. Contains a list of all installed extensions.</td> </tr> <tr> <td><code>prefs</code></td> <td><code>readonly attribute <a href="/en/Toolkit_API/extIPreferenceBranch" title="en/FUEL/PreferenceBranch">extIPreferenceBranch</a></code></td> <td>The preferences object for the application. Defaults to an empty root branch.</td> </tr> <tr> <td><code>storage</code></td> <td><code>readonly attribute <a href="/en/Toolkit_API/extISessionStorage" title="en/FUEL/SessionStorage">extISessionStorage</a></code></td> <td>The storage object for the application.</td> </tr> <tr> <td><code>events</code></td> <td><code>readonly attribute <a href="/en/Toolkit_API/extIEvents" title="en/FUEL/Events">extIEvents</a></code></td> <td> <p>The events object for the application. supports: "load", "ready", "quit", "unload"</p> </td> </tr> </tbody>
</table>
<p>The following interfaces are only available to Firefox:</p>
<table class="standard-table"> <tbody> <tr> <td class="header">Attribute</td> <td class="header">Type</td> <td class="header">Description</td> </tr> <tr> <td><code>bookmarks</code></td> <td><code>readonly attribute <a href="/en/Toolkit_API/FUEL/fuelIBookmarkFolder" title="en/FUEL/BookmarkFolder">fuelIBookmarkFolder</a></code></td> <td>The root bookmarks object for the application.</td> </tr> <tr> <td><code>windows</code></td> <td><code>readonly attribute nsIVariant</code></td> <td>An array of browser windows within the application.</td> </tr> <tr> <td><code>activeWindow</code></td> <td><code>readonly attribute <a href="/en/Toolkit_API/FUEL/fuelIWindow" title="en/FUEL/Window">fuelIWindow</a></code></td> <td>The currently active browser window.</td> </tr> </tbody>
</table>
<h2 name="Methods">Methods</h2>
<h3>quit() {{ gecko_minversion_inline("1") }}</h3>
<p>Attempts to shutdown the application. It is possible for the shutdown to be canceled.</p>
<pre>boolean quit()</pre>
<h6>Return value</h6>
<p>boolean value indicating whether the shutdown was successful.</p>
<h3>restart() {{ gecko_minversion_inline("1") }}</h3>
<p>Attempts to restart the application. It is possible for the restart to be canceled.</p>
<pre>boolean restart()</pre>
<h6>Return value</h6>
<p>boolean value indicating whether the restart was successful.</p>
<h2>XPCOM</h2>
<p>Although the 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:</p>
<pre>var Application = Components.classes["@mozilla.org/fuel/application;1"].getService(Components.interfaces.fuelIApplication);
</pre>
<h2 name="See_also">See also</h2>
<p><a class="internal" href="/en/Toolkit_API/FUEL" title="en/FUEL">FUEL</a> (Firefox), <a class="internal" href="/en/Toolkit_API/STEEL" title="en/Thunderbird/STEEL">STEEL</a> (Thunderbird) and <a class="internal" href="/en/Toolkit_API/SMILE" title="en/SeaMonkey/SMILE">SMILE</a> (SeaMonkey)</p>
<p>{{ languages( { "es": "es/FUEL/Application", "fr": "fr/FUEL/Application", "ja": "ja/FUEL/Application" } ) }}</p>
Revert to this revision