OLD | NEW |
1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc.
Note: | 1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc.
Note: |
2 1) The <head> information in this page is significant, should be uniform | 2 1) The <head> information in this page is significant, should be uniform |
3 across api docs and should be edited only with knowledge of the | 3 across api docs and should be edited only with knowledge of the |
4 templating mechanism. | 4 templating mechanism. |
5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a | 5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a |
6 browser, it will be re-generated from the template, json schema and | 6 browser, it will be re-generated from the template, json schema and |
7 authored overview content. | 7 authored overview content. |
8 4) The <body>.innerHTML is also generated by an offline step so that this | 8 4) The <body>.innerHTML is also generated by an offline step so that this |
9 page may easily be indexed by search engines. | 9 page may easily be indexed by search engines. |
10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> | 10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 an extension contains a JSON configuration file called <code>config.json</code>, | 293 an extension contains a JSON configuration file called <code>config.json</code>, |
294 in a <code>config_resources</code> folder, the extension can retrieve the file's
contents like | 294 in a <code>config_resources</code> folder, the extension can retrieve the file's
contents like |
295 this:</p> | 295 this:</p> |
296 | 296 |
297 <pre>var xhr = new XMLHttpRequest(); | 297 <pre>var xhr = new XMLHttpRequest(); |
298 xhr.onreadystatechange = handleStateChange; // Implemented elsewhere. | 298 xhr.onreadystatechange = handleStateChange; // Implemented elsewhere. |
299 xhr.open("GET", chrome.extension.getURL('/config_resources/config.json'), true); | 299 xhr.open("GET", chrome.extension.getURL('/config_resources/config.json'), true); |
300 xhr.send(); | 300 xhr.send(); |
301 </pre> | 301 </pre> |
302 | 302 |
| 303 <p class="caution"> |
| 304 <b>Bug note:</b> |
| 305 Until <a href="http://crbug.com/41024">bug 41024</a> is fixed, |
| 306 the preceding code won't work. |
| 307 </p> |
| 308 |
303 <p>If the extension attempts to use a security origin other than itself, | 309 <p>If the extension attempts to use a security origin other than itself, |
304 say http://www.google.com, | 310 say http://www.google.com, |
305 the browser disallows it | 311 the browser disallows it |
306 unless the extension has requested the appropriate cross-origin permissions. | 312 unless the extension has requested the appropriate cross-origin permissions. |
307 </p> | 313 </p> |
308 | 314 |
309 <h2 id="requesting-permission">Requesting cross-origin permissions</h2> | 315 <h2 id="requesting-permission">Requesting cross-origin permissions</h2> |
310 | 316 |
311 <p>By adding hosts or host match patterns (or both) to the | 317 <p>By adding hosts or host match patterns (or both) to the |
312 <a href="manifest.html#permissions">permissions</a> section of the | 318 <a href="manifest.html#permissions">permissions</a> section of the |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 _uff=0; | 616 _uff=0; |
611 urchinTracker(); | 617 urchinTracker(); |
612 } | 618 } |
613 catch(e) {/* urchinTracker not available. */} | 619 catch(e) {/* urchinTracker not available. */} |
614 </script> | 620 </script> |
615 <!-- end analytics --> | 621 <!-- end analytics --> |
616 </div> | 622 </div> |
617 </div> <!-- /gc-footer --> | 623 </div> <!-- /gc-footer --> |
618 </div> <!-- /gc-container --> | 624 </div> <!-- /gc-container --> |
619 </body></html> | 625 </body></html> |
OLD | NEW |