OLD | NEW |
1 <div id="pageData-name" class="pageData">Background Pages</div> | 1 <div id="pageData-name" class="pageData">Background Pages</div> |
2 <div id="pageData-showTOC" class="pageData">true</div> | 2 <div id="pageData-showTOC" class="pageData">true</div> |
3 | 3 |
4 <p> | 4 <p> |
5 A common need for extensions is to have | 5 A common need for extensions is to have |
6 a single long-running script to manage some task or state. | 6 a single long-running script to manage some task or state. |
7 Background pages to the rescue. | 7 Background pages to the rescue. |
8 </p> | 8 </p> |
9 | 9 |
10 <p> | 10 <p> |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 If you need to specify HTML | 58 If you need to specify HTML |
59 in your background page, you can | 59 in your background page, you can |
60 do that using the <code>page</code> | 60 do that using the <code>page</code> |
61 property instead: | 61 property instead: |
62 </p> | 62 </p> |
63 | 63 |
64 <pre>{ | 64 <pre>{ |
65 "name": "My extension", | 65 "name": "My extension", |
66 ... | 66 ... |
67 <b>"background": { | 67 <b>"background": { |
68 "page": ["background.html"] | 68 "page": "background.html" |
69 }</b>, | 69 }</b>, |
70 ... | 70 ... |
71 }</pre> | 71 }</pre> |
72 | 72 |
73 <p> | 73 <p> |
74 If you need the browser to start up early—so | 74 If you need the browser to start up early—so |
75 you can display notifications, for example—then | 75 you can display notifications, for example—then |
76 you might also want to specify the | 76 you might also want to specify the |
77 <a href="manifest.html#permissions">"background" permission</a>. | 77 <a href="manifest.html#permissions">"background" permission</a>. |
78 </p> | 78 </p> |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 <body> | 146 <body> |
147 <p> | 147 <p> |
148 Image here: | 148 Image here: |
149 </p> | 149 </p> |
150 | 150 |
151 <img id="target" src="white.png" width="640" height="480"> | 151 <img id="target" src="white.png" width="640" height="480"> |
152 | 152 |
153 </body> | 153 </body> |
154 </html> | 154 </html> |
155 </pre> | 155 </pre> |
OLD | NEW |