OLD | NEW |
1 <h2 id="manifest">Manifest</h2> | 1 <h2 id="manifest">Manifest</h2> |
2 <p> | 2 <p> |
3 When requested, a <code>$(ref:windows.Window)</code> | 3 When requested, a <code>$(ref:windows.Window)</code> |
4 will contain an array of <code>$(ref:tabs.Tab)</code> objects. | 4 will contain an array of <code>$(ref:tabs.Tab)</code> objects. |
5 | 5 |
6 You must declare the <code>"tabs"</code> permission in your | 6 You must declare the <code>"tabs"</code> permission in your |
7 <a href="manifest.html">manifest</a> if you require access to the | 7 <a href="manifest">manifest</a> if you require access to the |
8 <code>$(ref:tabs.Tab.url url)</code>, | 8 <code>$(ref:tabs.Tab.url url)</code>, |
9 <code>$(ref:tabs.Tab.title title)</code>, or | 9 <code>$(ref:tabs.Tab.title title)</code>, or |
10 <code>$(ref:tabs.Tab.favIconUrl favIconUrl)</code> properties of | 10 <code>$(ref:tabs.Tab.favIconUrl favIconUrl)</code> properties of |
11 <code>$(ref:tabs.Tab)</code>. | 11 <code>$(ref:tabs.Tab)</code>. |
12 For example: | 12 For example: |
13 </p> | 13 </p> |
14 | 14 |
15 <pre data-filename="manifest.json"> | 15 <pre data-filename="manifest.json"> |
16 { | 16 { |
17 "name": "My extension", | 17 "name": "My extension", |
(...skipping 18 matching lines...) Expand all Loading... |
36 | 36 |
37 <p>For example, say an extension | 37 <p>For example, say an extension |
38 creates a few tabs or windows from a single HTML file, | 38 creates a few tabs or windows from a single HTML file, |
39 and that the HTML file | 39 and that the HTML file |
40 contains a call to | 40 contains a call to |
41 $(ref:tabs.query). | 41 $(ref:tabs.query). |
42 The current window is the window that contains the page that made | 42 The current window is the window that contains the page that made |
43 the call, no matter what the topmost window is. | 43 the call, no matter what the topmost window is. |
44 </p> | 44 </p> |
45 | 45 |
46 <p>In the case of the <a href="event_pages.html">event page</a>, | 46 <p>In the case of the <a href="event_pages">event page</a>, |
47 the value of the current window falls back to the last active window. Under some | 47 the value of the current window falls back to the last active window. Under some |
48 circumstances, there may be no current window for background pages. | 48 circumstances, there may be no current window for background pages. |
49 </p> | 49 </p> |
50 | 50 |
51 <h2 id="examples"> Examples </h2> | 51 <h2 id="examples"> Examples </h2> |
52 | 52 |
53 <p> | 53 <p> |
54 <img src="{{static}}/images/windows.png" | 54 <img src="{{static}}/images/windows.png" |
55 width="561" height="224" alt="Two windows, each with one tab" /> | 55 width="561" height="224" alt="Two windows, each with one tab" /> |
56 <br> | 56 <br> |
57 You can find simple examples of using the windows module in the | 57 You can find simple examples of using the windows module in the |
58 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extension
s/docs/examples/api/windows/">examples/api/windows</a> | 58 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extension
s/docs/examples/api/windows/">examples/api/windows</a> |
59 directory. | 59 directory. |
60 Another example is in the | 60 Another example is in the |
61 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extension
s/docs/examples/api/tabs/inspector/tabs_api.html?content-type=text/plain">tabs_a
pi.html</a> file | 61 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extension
s/docs/examples/api/tabs/inspector/tabs_api.html?content-type=text/plain">tabs_a
pi.html</a> file |
62 of the | 62 of the |
63 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extension
s/docs/examples/api/tabs/inspector/">inspector</a> | 63 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extension
s/docs/examples/api/tabs/inspector/">inspector</a> |
64 example. | 64 example. |
65 For other examples and for help in viewing the source code, see | 65 For other examples and for help in viewing the source code, see |
66 <a href="samples.html">Samples</a>. | 66 <a href="samples">Samples</a>. |
67 </p> | 67 </p> |
OLD | NEW |