OLD | NEW |
1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc.
Note: | 1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc.
Note: |
2 1) The <head> information in this page is significant, should be uniform | 2 1) The <head> information in this page is significant, should be uniform |
3 across api docs and should be edited only with knowledge of the | 3 across api docs and should be edited only with knowledge of the |
4 templating mechanism. | 4 templating mechanism. |
5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a | 5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a |
6 browser, it will be re-generated from the template, json schema and | 6 browser, it will be re-generated from the template, json schema and |
7 authored overview content. | 7 authored overview content. |
8 4) The <body>.innerHTML is also generated by an offline step so that this | 8 4) The <body>.innerHTML is also generated by an offline step so that this |
9 page may easily be indexed by search engines. | 9 page may easily be indexed by search engines. |
10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> | 10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 <p class="note"> | 250 <p class="note"> |
251 <b>Important:</b> | 251 <b>Important:</b> |
252 Packaged apps <b>must</b> use | 252 Packaged apps <b>must</b> use |
253 <a href="manifestVersion.html">manifest version 2</a>. | 253 <a href="manifestVersion.html">manifest version 2</a>. |
254 </p> | 254 </p> |
255 <h2 id="two">Step 2: Create the background script</h2> | 255 <h2 id="two">Step 2: Create the background script</h2> |
256 <p> | 256 <p> |
257 Next create a new file called <code>background.js</code> | 257 Next create a new file called <code>background.js</code> |
258 with the following content: | 258 with the following content: |
259 </p> | 259 </p> |
260 <pre>chrome.experimental.app.onLaunched.addListener(function() { | 260 <pre>chrome.app.runtime.onLaunched.addListener(function() { |
261 chrome.app.window.create('window.html', { | 261 chrome.app.window.create('window.html', { |
262 'width': 400, | 262 'width': 400, |
263 'height': 500 | 263 'height': 500 |
264 }); | 264 }); |
265 }); | 265 }); |
266 </pre> | 266 </pre> |
267 <p> | 267 <p> |
268 In the above sample code, | 268 In the above sample code, |
269 the <a href="app_lifecycle.html#lifecycle">onLaunched event</a> | 269 the <a href="app_lifecycle.html#lifecycle">onLaunched event</a> |
270 will be fired when the user starts the app. | 270 will be fired when the user starts the app. |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 _uff=0; | 373 _uff=0; |
374 urchinTracker(); | 374 urchinTracker(); |
375 } | 375 } |
376 catch(e) {/* urchinTracker not available. */} | 376 catch(e) {/* urchinTracker not available. */} |
377 </script> | 377 </script> |
378 <!-- end analytics --> | 378 <!-- end analytics --> |
379 </div> | 379 </div> |
380 </div> <!-- /gc-footer --> | 380 </div> <!-- /gc-footer --> |
381 </div> <!-- /gc-container --> | 381 </div> <!-- /gc-container --> |
382 </body></html> | 382 </body></html> |
OLD | NEW |