mozilla

Compare Revisions

Using nsIXULAppInfo

Change Revisions

Revision 85098:

Revision 85098 by julienfabre on

Revision 85099:

Revision 85099 by jhatlak on

Title:
Using nsIXULAppInfo
Using nsIXULAppInfo
Slug:
Using_nsIXULAppInfo
Using_nsIXULAppInfo
Tags:
Extensions, Add-ons
Extensions, Add-ons
Content:

Revision 85098
Revision 85099
n16    <h2 name="nsIXULAppInfo_interface">n16    <h2 id="nsIXULAppInfo_interface" name="nsIXULAppInfo_interfac
 >e">
n20      To distinguish between different Mozilla-based applicationsn20      To distinguish between different Mozilla-based applications
>, use the frozen <a href="/en/nsIXULAppInfo" title="en/nsIXULAppI>, use the frozen <a href="/en/XPCOM_Interface_Reference/nsIXULApp
>nfo">nsIXULAppInfo</a> interface. The following sections provide >Info" title="en/nsIXULAppInfo">nsIXULAppInfo</a> interface. The f
>a few examples of using <code>nsIXULAppInfo</code> from JavaScrip>ollowing sections provide a few examples of using <code>nsIXULApp
>t.>Info</code> from JavaScript.
n25    <h3 name="Getting_nsIXULAppInfo">n25    <h3 id="Getting_nsIXULAppInfo" name="Getting_nsIXULAppInfo">
n38    <h3 name="Getting_application_information">n38    <h3 id="Getting_application_information" name="Getting_applic
 >ation_information">
n42      After you obtained the app info component, you can read itsn42      After you obtained the app info component, you can read its
> properties to get the application's ID, human-readable name, ver> properties to get the application's ID, human-readable name, ver
>sion, platform version, etc. For complete list of <code>nsIXULApp>sion, platform version, etc. For complete list of <code>nsIXULApp
>Info</code>'s properties, please see <a href="/en/nsIXULAppInfo" >Info</code>'s properties, please see <a href="/en/XPCOM_Interface
>title="en/nsIXULAppInfo">nsIXULAppInfo</a> interface description.>_Reference/nsIXULAppInfo" title="en/nsIXULAppInfo">nsIXULAppInfo<
 >/a> interface description.
n44    <h4 name="ID">n44    <h4 id="ID" name="ID">
nn53const SEAMONKEY_ID = "{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}";
nn60} else if(appInfo.ID == SEAMONKEY_ID) {
61  // running under SeaMonkey
n64      Note: you could also use <code>nsIXULAppInfo.name</code>, wn67      Note: you could also use <code>nsIXULAppInfo.name</code>, w
>hich is a human-readable name for the application, such as "Firef>hich is a human-readable name for the application, such as "Firef
>ox", but who knows, maybe they'll rename it again!>ox", "Thunderbird" or "SeaMonkey", but who knows, maybe they'll r
 >ename it again!
n66    <h4 name="Version">n69    <h4 id="Version" name="Version">
n107    <h4 name="Platform_version">n110    <h4 id="Platform_version" name="Platform_version">
n122    <h2 name="Older_versions">n125    <h2 id="Older_versions" name="Older_versions">
t152    <h2 name="See_also">t155    <h2 id="See_also" name="See_also">

Back to History