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 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 }</pre> | 76 }</pre> |
77 | 77 |
78 <p> | 78 <p> |
79 If you need the browser to start up early—so | 79 If you need the browser to start up early—so |
80 you can display notifications, for example—then | 80 you can display notifications, for example—then |
81 you might also want to specify the | 81 you might also want to specify the |
82 <a href="manifest.html#permissions">"background" permission</a>. | 82 <a href="manifest.html#permissions">"background" permission</a>. |
83 </p> | 83 </p> |
84 | 84 |
85 | 85 |
86 <h2>Details</h2> | 86 <h2 id="details">Details</h2> |
87 | 87 |
88 <p> | 88 <p> |
89 You can communicate between your various pages using direct script calls, | 89 You can communicate between your various pages using direct script calls, |
90 similar to how frames can communicate. | 90 similar to how frames can communicate. |
91 The <a href="extension.html#method-getViews"><code>chrome.extension.getViews()</
code></a> method | 91 The <a href="extension.html#method-getViews"><code>chrome.extension.getViews()</
code></a> method |
92 returns a list of window objects | 92 returns a list of window objects |
93 for every active page belonging to your extension, | 93 for every active page belonging to your extension, |
94 and the | 94 and the |
95 <a href="extension.html#method-getBackgroundPage"><code>chrome.extension.getBack
groundPage()</code></a> method | 95 <a href="extension.html#method-getBackgroundPage"><code>chrome.extension.getBack
groundPage()</code></a> method |
96 returns the background page. | 96 returns the background page. |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 150 |
151 <body> | 151 <body> |
152 <p> | 152 <p> |
153 Image here: | 153 Image here: |
154 </p> | 154 </p> |
155 | 155 |
156 <img id="target" src="white.png" width="640" height="480"> | 156 <img id="target" src="white.png" width="640" height="480"> |
157 | 157 |
158 </body> | 158 </body> |
159 </html> | 159 </html> |
160 </pre> | 160 </pre> |
OLD | NEW |