| OLD | NEW |
| 1 <div id="pageData-name" class="pageData">Other APIs</div> | 1 <h1>Other APIs</h1> |
| 2 | 2 |
| 3 <p> | 3 <p> |
| 4 In addition to the | 4 In addition to the |
| 5 <a href="api_index.html">chrome.* APIs</a>, | 5 <a href="api_index.html">chrome.* APIs</a>, |
| 6 extensions can use all the APIs | 6 extensions can use all the APIs |
| 7 that the browser provides | 7 that the browser provides |
| 8 to web pages and apps. | 8 to web pages and apps. |
| 9 If the browser doesn't support an API you want to use, | 9 If the browser doesn't support an API you want to use, |
| 10 you can bundle additional API libraries into your extension. | 10 you can bundle additional API libraries into your extension. |
| 11 </p> | 11 </p> |
| 12 | 12 |
| 13 <p>Here's a sampling of the APIs that extensions can use:</p> | 13 <p>Here's a sampling of the APIs that extensions can use:</p> |
| 14 | 14 |
| 15 <dl> | 15 <dl> |
| 16 <dt><strong> Standard JavaScript APIs </strong></dt> | 16 <dt><strong> Standard JavaScript APIs </strong></dt> |
| 17 <dd> These are the same core JavaScript and | 17 <dd> These are the same core JavaScript and |
| 18 <a href="https://developer.mozilla.org/en/Gecko_DOM_Reference">Document Object
Model</a> | 18 <a href="https://developer.mozilla.org/en/Gecko_DOM_Reference">Document Object
Model</a> |
| 19 (DOM) APIs | 19 (DOM) APIs |
| 20 that you can use in ordinary web apps. | 20 that you can use in ordinary web apps. |
| 21 <!-- [PENDING: check! should link to complete list] --> | 21 |
| 22 <!-- Use onclick in your toolbar div to add click behavior. | 22 <!-- Use onclick in your toolbar div to add click behavior. |
| 23 E.g. window.open(someUrl). --></dd> | 23 E.g. window.open(someUrl). --></dd> |
| 24 <dt><strong> XMLHttpRequest </strong></dt> | 24 <dt><strong> XMLHttpRequest </strong></dt> |
| 25 <dd> | 25 <dd> |
| 26 Use <a href="xhr.html">XMLHttpRequest</a> | 26 Use <a href="xhr.html">XMLHttpRequest</a> |
| 27 to request data from one or more servers. | 27 to request data from one or more servers. |
| 28 The <a href="manifest.html#permissions">permissions</a> field | 28 The <a href="manifest.html#permissions">permissions</a> field |
| 29 of the manifest specifies | 29 of the manifest specifies |
| 30 which hosts the extension can send requests to. | 30 which hosts the extension can send requests to. |
| 31 </dd> | 31 </dd> |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 such as filters, animations, and transformations. | 66 such as filters, animations, and transformations. |
| 67 Here's an example of using WebKit styles | 67 Here's an example of using WebKit styles |
| 68 to make the UI spin: | 68 to make the UI spin: |
| 69 <pre><style> | 69 <pre><style> |
| 70 div:hover { | 70 div:hover { |
| 71 -webkit-transform: rotate(360deg); | 71 -webkit-transform: rotate(360deg); |
| 72 -webkit-transition: all 1s ease-out; | 72 -webkit-transition: all 1s ease-out; |
| 73 } | 73 } |
| 74 </style> | 74 </style> |
| 75 </pre> | 75 </pre> |
| 76 <!-- [PENDING: link to complete list of webkit apis] --> | 76 |
| 77 </dd> | 77 </dd> |
| 78 <dt><strong> V8 APIs</strong>, such as<strong> JSON </strong></dt> | 78 <dt><strong> V8 APIs</strong>, such as<strong> JSON </strong></dt> |
| 79 <dd> Because JSON is in V8, you don't need to include a JSON library to use JSON
functions. <!-- [PENDING: what other APIs are in v8? link to complete list] -->
</dd> | 79 <dd> Because JSON is in V8, you don't need to include a JSON library to use JSON
functions. </dd> |
| 80 <dt><strong>APIs in bundled libraries</strong></dt> | 80 <dt><strong>APIs in bundled libraries</strong></dt> |
| 81 <dd> If you want to use a library that the browser doesn't provide | 81 <dd> If you want to use a library that the browser doesn't provide |
| 82 (for example, jQuery), | 82 (for example, jQuery), |
| 83 you can bundle that library's JavaScript files with your extension. | 83 you can bundle that library's JavaScript files with your extension. |
| 84 Bundled libraries work in extensions | 84 Bundled libraries work in extensions |
| 85 just as they do in other web pages. | 85 just as they do in other web pages. |
| 86 </dd> | 86 </dd> |
| 87 </dl> | 87 </dl> |
| OLD | NEW |