| 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 because multiple toolstrips can be active at any one time | 217 because multiple toolstrips can be active at any one time |
| 218 (one per browser window). | 218 (one per browser window). |
| 219 Background pages to the rescue. | 219 Background pages to the rescue. |
| 220 </p> | 220 </p> |
| 221 | 221 |
| 222 <p> | 222 <p> |
| 223 The background page is similar to a toolstrip, | 223 The background page is similar to a toolstrip, |
| 224 in that it is an HTML page that runs in the extension process. | 224 in that it is an HTML page that runs in the extension process. |
| 225 The difference is that the background page exists | 225 The difference is that the background page exists |
| 226 for the lifetime of your extension, | 226 for the lifetime of your extension, |
| 227 and only one instance of it at a time is active.</p> | 227 and only one instance of it at a time is active. |
| 228 </p> |
| 229 |
| 230 <p> |
| 231 In a typical extension with a background page, |
| 232 the UI — |
| 233 toolstrips, page actions, and so on — |
| 234 is implemented with dumb views. |
| 235 When the view needs some state, |
| 236 it requests the state from the background page. |
| 237 When the background page notices a state change, |
| 238 the background page tells the views to update. |
| 239 </p> |
| 228 | 240 |
| 229 <h2 id="manifest">Manifest</h2> | 241 <h2 id="manifest">Manifest</h2> |
| 230 | 242 |
| 231 <p> | 243 <p> |
| 232 Register your background page in the extension manifest, like this: | 244 Register your background page in the extension manifest, like this: |
| 233 </p> | 245 </p> |
| 234 | 246 |
| 235 <pre>{ | 247 <pre>{ |
| 236 "name": "My First Extension", | 248 "name": "My First Extension", |
| 237 "version": "1.0", | 249 "version": "1.0", |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 urchinTracker(); | 457 urchinTracker(); |
| 446 } | 458 } |
| 447 catch(e) {/* urchinTracker not available. */} | 459 catch(e) {/* urchinTracker not available. */} |
| 448 </script> | 460 </script> |
| 449 <!-- end analytics --> | 461 <!-- end analytics --> |
| 450 | 462 |
| 451 </div> <!-- /pageFooter --> | 463 </div> <!-- /pageFooter --> |
| 452 </div> <!-- /container --> | 464 </div> <!-- /container --> |
| 453 </body></html> | 465 </body></html> |
| 454 | 466 |
| OLD | NEW |