mozilla

Compare Revisions

bootstrap.js

Change Revisions

Revision 77379:

Revision 77379 by BrunoLM on

Revision 77380:

Revision 77380 by BrunoLM on

Title:
bootstrap.js
bootstrap.js
Slug:
Extensions/bootstrap.js
Extensions/bootstrap.js
Tags:
Extensions, Add-ons, Bootstrap
Extensions, Add-ons, Bootstrap
Content:

Revision 77379
Revision 77380
n13    <p>n13    <pre style="font-family:Consolas;font-size:13;color:black;bac
 >kground:white;">
14      {{ syntax.javascript{code: "function startup(data, reason) 14<span style="color:blue;">function</span> startup(data, reason) {
>{ &nbsp;&nbsp;&nbsp; /// &lt;summary&gt; &nbsp;&nbsp;&nbsp; /// B 
>ootstrap data structure @see https://developer.mozilla.org/en/Ext 
>ensions/Bootstrapped_extensions#Bootstrap_data &nbsp;&nbsp;&nbsp; 
> /// &amp;#10;&nbsp; string id &nbsp;&nbsp;&nbsp; /// &amp;#10;&n 
>bsp; string version &nbsp;&nbsp;&nbsp; /// &amp;#10;&nbsp; nsIFil 
>e installPath &nbsp;&nbsp;&nbsp; /// &amp;#10;&nbsp; nsIURI resou 
>rceURI &nbsp;&nbsp;&nbsp; /// &amp;#10; &nbsp;&nbsp;&nbsp; /// Re 
>ason types: &nbsp;&nbsp;&nbsp; /// &amp;#10;&nbsp; APP_STARTUP &n 
>bsp;&nbsp;&nbsp; /// &amp;#10;&nbsp; ADDON_ENABLE &nbsp;&nbsp;&nb 
>sp; /// &amp;#10;&nbsp; ADDON_INSTALL &nbsp;&nbsp;&nbsp; /// &amp 
>;#10;&nbsp; ADDON_UPGRADE &nbsp;&nbsp;&nbsp; /// &amp;#10;&nbsp;  
>ADDON_DOWNGRADE &nbsp;&nbsp;&nbsp; /// &lt;/summary&gt; } functio 
>n shutdown(data, reason) { &nbsp;&nbsp;&nbsp; /// &lt;summary&gt; 
> &nbsp;&nbsp;&nbsp; /// Bootstrap data structure @see https://dev 
>eloper.mozilla.org/en/Extensions/Bootstrapped_extensions#Bootstra 
>p_data &nbsp;&nbsp;&nbsp; /// &amp;#10;&nbsp; string id &nbsp;&nb 
>sp;&nbsp; /// &amp;#10;&nbsp; string version &nbsp;&nbsp;&nbsp; / 
>// &amp;#10;&nbsp; nsIFile installPath &nbsp;&nbsp;&nbsp; /// &am 
>p;#10;&nbsp; nsIURI resourceURI &nbsp;&nbsp;&nbsp; /// &amp;#10;  
>&nbsp;&nbsp;&nbsp; /// Reason types: &nbsp;&nbsp;&nbsp; /// &amp; 
>#10;&nbsp; APP_SHUTDOWN &nbsp;&nbsp;&nbsp; /// &amp;#10;&nbsp; AD 
>DON_DISABLE &nbsp;&nbsp;&nbsp; /// &amp;#10;&nbsp; ADDON_UNINSTAL 
>L &nbsp;&nbsp;&nbsp; /// &amp;#10;&nbsp; ADDON_UPGRADE &nbsp;&nbs 
>p;&nbsp; /// &amp;#10;&nbsp; ADDON_DOWNGRADE &nbsp;&nbsp;&nbsp; / 
>// &lt;/summary&gt; } function install(data, reason) { &nbsp;&nbs 
>p;&nbsp; /// &lt;summary&gt; &nbsp;&nbsp;&nbsp; /// Bootstrap dat 
>a structure @see https://developer.mozilla.org/en/Extensions/Boot 
>strapped_extensions#Bootstrap_data &nbsp;&nbsp;&nbsp; /// &amp;#1 
>0;&nbsp; string id &nbsp;&nbsp;&nbsp; /// &amp;#10;&nbsp; string  
>version &nbsp;&nbsp;&nbsp; /// &amp;#10;&nbsp; nsIFile installPat 
>h &nbsp;&nbsp;&nbsp; /// &amp;#10;&nbsp; nsIURI resourceURI &nbsp 
>;&nbsp;&nbsp; /// &amp;#10; &nbsp;&nbsp;&nbsp; /// Reason types:  
>&nbsp;&nbsp;&nbsp; /// &amp;#10;&nbsp; ADDON_INSTALL &nbsp;&nbsp; 
>&nbsp; /// &amp;#10;&nbsp; ADDON_UPGRADE &nbsp;&nbsp;&nbsp; /// & 
>amp;#10;&nbsp; ADDON_DOWNGRADE &nbsp;&nbsp;&nbsp; /// &lt;/summar 
>y&gt; } function uninstall(data, reason) { &nbsp;&nbsp;&nbsp; /// 
> &lt;summary&gt; &nbsp;&nbsp;&nbsp; /// Bootstrap data structure  
>@see https://developer.mozilla.org/en/Extensions/Bootstrapped_ext 
>ensions#Bootstrap_data &nbsp;&nbsp;&nbsp; /// &amp;#10;&nbsp; str 
>ing id &nbsp;&nbsp;&nbsp; /// &amp;#10;&nbsp; string version &nbs 
>p;&nbsp;&nbsp; /// &amp;#10;&nbsp; nsIFile installPath &nbsp;&nbs 
>p;&nbsp; /// &amp;#10;&nbsp; nsIURI resourceURI &nbsp;&nbsp;&nbsp 
>; /// &amp;#10; &nbsp;&nbsp;&nbsp; /// Reason types: &nbsp;&nbsp; 
>&nbsp; /// &amp;#10;&nbsp; ADDON_UNINSTALL &nbsp;&nbsp;&nbsp; /// 
> &amp;#10;&nbsp; ADDON_UPGRADE &nbsp;&nbsp;&nbsp; /// &amp;#10;&n 
>bsp; ADDON_DOWNGRADE &nbsp;&nbsp;&nbsp; /// &lt;/summary&gt; }"}  
>}} 
15    </p>15    <span style="color:darkgreen;">/// &lt;summary&gt;</span>
16    <pre>
17function startup(data, reason) {
18    /// &lt;summary&gt;
19    /// Bootstrap data structure @see https://developer.mozilla.o16    <span style="color:darkgreen;">/// Bootstrap data structure @
>rg/en/Extensions/Bootstrapped_extensions#Bootstrap_data>see https://developer.mozilla.org/en/Extensions/Bootstrapped_exte
 >nsions#Bootstrap_data</span>
20    /// &amp;#10;  string id17    <span style="color:darkgreen;">/// &amp;#10;  string id</span
 >>
21    /// &amp;#10;  string version18    <span style="color:darkgreen;">/// &amp;#10;  string version<
 >/span>
22    /// &amp;#10;  nsIFile installPath19    <span style="color:darkgreen;">/// &amp;#10;  nsIFile install
 >Path</span>
23    /// &amp;#10;  nsIURI resourceURI20    <span style="color:darkgreen;">/// &amp;#10;  nsIURI resource
 >URI</span>
24    /// &amp;#10;21    <span style="color:darkgreen;">/// &amp;#10;</span>
25    /// Reason types:22    <span style="color:darkgreen;">/// Reason types:</span>
26    /// &amp;#10;  APP_STARTUP23    <span style="color:darkgreen;">/// &amp;#10;  APP_STARTUP</sp
 >an>
27    /// &amp;#10;  ADDON_ENABLE24    <span style="color:darkgreen;">/// &amp;#10;  ADDON_ENABLE</s
 >pan>
28    /// &amp;#10;  ADDON_INSTALL25    <span style="color:darkgreen;">/// &amp;#10;  ADDON_INSTALL</
 >span>
29    /// &amp;#10;  ADDON_UPGRADE26    <span style="color:darkgreen;">/// &amp;#10;  ADDON_UPGRADE</
 >span>
30    /// &amp;#10;  ADDON_DOWNGRADE27    <span style="color:darkgreen;">/// &amp;#10;  ADDON_DOWNGRADE
 ></span>
31    /// &lt;/summary&gt;28    <span style="color:darkgreen;">/// &lt;/summary&gt;</span>
n33function shutdown(data, reason) {n30<span style="color:blue;">function</span> shutdown(data, reason) 
 >{
34    /// &lt;summary&gt;31    <span style="color:darkgreen;">/// &lt;summary&gt;</span>
35    /// Bootstrap data structure @see https://developer.mozilla.o32    <span style="color:darkgreen;">/// Bootstrap data structure @
>rg/en/Extensions/Bootstrapped_extensions#Bootstrap_data>see https://developer.mozilla.org/en/Extensions/Bootstrapped_exte
 >nsions#Bootstrap_data</span>
36    /// &amp;#10;  string id33    <span style="color:darkgreen;">/// &amp;#10;  string id</span
 >>
37    /// &amp;#10;  string version34    <span style="color:darkgreen;">/// &amp;#10;  string version<
 >/span>
38    /// &amp;#10;  nsIFile installPath35    <span style="color:darkgreen;">/// &amp;#10;  nsIFile install
 >Path</span>
39    /// &amp;#10;  nsIURI resourceURI36    <span style="color:darkgreen;">/// &amp;#10;  nsIURI resource
 >URI</span>
40    /// &amp;#10;37    <span style="color:darkgreen;">/// &amp;#10;</span>
41    /// Reason types:38    <span style="color:darkgreen;">/// Reason types:</span>
42    /// &amp;#10;  APP_SHUTDOWN39    <span style="color:darkgreen;">/// &amp;#10;  APP_SHUTDOWN</s
 >pan>
43    /// &amp;#10;  ADDON_DISABLE40    <span style="color:darkgreen;">/// &amp;#10;  ADDON_DISABLE</
 >span>
44    /// &amp;#10;  ADDON_UNINSTALL41    <span style="color:darkgreen;">/// &amp;#10;  ADDON_UNINSTALL
 ></span>
45    /// &amp;#10;  ADDON_UPGRADE42    <span style="color:darkgreen;">/// &amp;#10;  ADDON_UPGRADE</
 >span>
46    /// &amp;#10;  ADDON_DOWNGRADE43    <span style="color:darkgreen;">/// &amp;#10;  ADDON_DOWNGRADE
 ></span>
47    /// &lt;/summary&gt;44    <span style="color:darkgreen;">/// &lt;/summary&gt;</span>
n49function install(data, reason) {n46<span style="color:blue;">function</span> install(data, reason) {
50    /// &lt;summary&gt;47    <span style="color:darkgreen;">/// &lt;summary&gt;</span>
51    /// Bootstrap data structure @see https://developer.mozilla.o48    <span style="color:darkgreen;">/// Bootstrap data structure @
>rg/en/Extensions/Bootstrapped_extensions#Bootstrap_data>see https://developer.mozilla.org/en/Extensions/Bootstrapped_exte
 >nsions#Bootstrap_data</span>
52    /// &amp;#10;  string id49    <span style="color:darkgreen;">/// &amp;#10;  string id</span
 >>
53    /// &amp;#10;  string version50    <span style="color:darkgreen;">/// &amp;#10;  string version<
 >/span>
54    /// &amp;#10;  nsIFile installPath51    <span style="color:darkgreen;">/// &amp;#10;  nsIFile install
 >Path</span>
55    /// &amp;#10;  nsIURI resourceURI52    <span style="color:darkgreen;">/// &amp;#10;  nsIURI resource
 >URI</span>
56    /// &amp;#10;53    <span style="color:darkgreen;">/// &amp;#10;</span>
57    /// Reason types:54    <span style="color:darkgreen;">/// Reason types:</span>
58    /// &amp;#10;  ADDON_INSTALL55    <span style="color:darkgreen;">/// &amp;#10;  ADDON_INSTALL</
 >span>
59    /// &amp;#10;  ADDON_UPGRADE56    <span style="color:darkgreen;">/// &amp;#10;  ADDON_UPGRADE</
 >span>
60    /// &amp;#10;  ADDON_DOWNGRADE57    <span style="color:darkgreen;">/// &amp;#10;  ADDON_DOWNGRADE
 ></span>
61    /// &lt;/summary&gt;58    <span style="color:darkgreen;">/// &lt;/summary&gt;</span>
t63function uninstall(data, reason) {t60<span style="color:blue;">function</span> uninstall(data, reason)
 > {
64    /// &lt;summary&gt;61    <span style="color:darkgreen;">/// &lt;summary&gt;</span>
65    /// Bootstrap data structure @see https://developer.mozilla.o62    <span style="color:darkgreen;">/// Bootstrap data structure @
>rg/en/Extensions/Bootstrapped_extensions#Bootstrap_data>see https://developer.mozilla.org/en/Extensions/Bootstrapped_exte
 >nsions#Bootstrap_data</span>
66    /// &amp;#10;  string id63    <span style="color:darkgreen;">/// &amp;#10;  string id</span
 >>
67    /// &amp;#10;  string version64    <span style="color:darkgreen;">/// &amp;#10;  string version<
 >/span>
68    /// &amp;#10;  nsIFile installPath65    <span style="color:darkgreen;">/// &amp;#10;  nsIFile install
 >Path</span>
69    /// &amp;#10;  nsIURI resourceURI66    <span style="color:darkgreen;">/// &amp;#10;  nsIURI resource
 >URI</span>
70    /// &amp;#10;67    <span style="color:darkgreen;">/// &amp;#10;</span>
71    /// Reason types:68    <span style="color:darkgreen;">/// Reason types:</span>
72    /// &amp;#10;  ADDON_UNINSTALL69    <span style="color:darkgreen;">/// &amp;#10;  ADDON_UNINSTALL
 ></span>
73    /// &amp;#10;  ADDON_UPGRADE70    <span style="color:darkgreen;">/// &amp;#10;  ADDON_UPGRADE</
 >span>
74    /// &amp;#10;  ADDON_DOWNGRADE71    <span style="color:darkgreen;">/// &amp;#10;  ADDON_DOWNGRADE
 ></span>
75    /// &lt;/summary&gt;72    <span style="color:darkgreen;">/// &lt;/summary&gt;</span>

Back to History