OLD | NEW |
1 <h1>Background Pages</h1> | 1 <h1>Background Pages</h1> |
2 | 2 |
3 | 3 |
4 <p id="eventPageWarning" class="warning"> | 4 <p id="eventPageWarning" class="warning"> |
5 <em>Caution:</em> Consider using event pages instead. | 5 <em>Caution:</em> Consider using event pages instead. |
6 <a href="event_pages.html">Learn more</a>. | 6 <a href="event_pages.html">Learn more</a>. |
7 </p> | 7 </p> |
8 | 8 |
9 <p> | 9 <p> |
10 A common need for extensions is to have | 10 A common need for extensions is to have |
11 a single long-running script to manage some task or state. | 11 a single long-running script to manage some task or state. |
12 Background pages to the rescue. | 12 Background pages to the rescue. |
13 </p> | 13 </p> |
14 | 14 |
15 <p> | 15 <p> |
16 As the <a href="overview.html#arch">architecture overview</a> explains, | 16 As the <a href="overview.html#arch">architecture overview</a> explains, |
17 the background page is an HTML page that runs in the extension process. | 17 the background page is an HTML page that runs in the extension process. |
18 It exists for the lifetime of your extension, | 18 It exists for the lifetime of your extension, |
19 and only one instance of it at a time is active. (Exception: if your | 19 and only one instance of it at a time is active. (Exception: if your |
20 extension uses <a href="manifest.html#incognito">incognito</a> | 20 extension uses <a href="manifest/incognito.html">incognito</a> |
21 "split" mode, a second instance is created for incognito windows.) | 21 "split" mode, a second instance is created for incognito windows.) |
22 </p> | 22 </p> |
23 | 23 |
24 <p> | 24 <p> |
25 In a typical extension with a background page, | 25 In a typical extension with a background page, |
26 the UI — | 26 the UI — |
27 for example, the browser action or page action | 27 for example, the browser action or page action |
28 and any options page — | 28 and any options page — |
29 is implemented by dumb views. | 29 is implemented by dumb views. |
30 When the view needs some state, | 30 When the view needs some state, |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 <body> | 153 <body> |
154 <p> | 154 <p> |
155 Image here: | 155 Image here: |
156 </p> | 156 </p> |
157 | 157 |
158 <img id="target" src="white.png" width="640" height="480"> | 158 <img id="target" src="white.png" width="640" height="480"> |
159 | 159 |
160 </body> | 160 </body> |
161 </html> | 161 </html> |
162 </pre> | 162 </pre> |
OLD | NEW |