OLD | NEW |
1 <div id="pageData-title" class="pageData">Cross-Origin XMLHttpRequest</div> | 1 <div id="pageData-title" class="pageData">Cross-Origin XMLHttpRequest</div> |
2 | 2 |
3 <!-- BEGIN AUTHORED CONTENT --> | 3 <!-- BEGIN AUTHORED CONTENT --> |
4 <p id="classSummary"> | 4 <p id="classSummary"> |
5 Regular web pages can use the | 5 Regular web pages can use the |
6 <a href="http://www.w3.org/TR/XMLHttpRequest/">XMLHttpRequest</a> | 6 <a href="http://www.w3.org/TR/XMLHttpRequest/">XMLHttpRequest</a> |
7 object to send and receive data from remote servers, | 7 object to send and receive data from remote servers, |
8 but they're limited by the | 8 but they're limited by the |
9 <a href="http://en.wikipedia.org/wiki/Same_origin_policy">same origin policy</a>
. | 9 <a href="http://en.wikipedia.org/wiki/Same_origin_policy">same origin policy</a>
. |
10 Extensions aren't so limited. | 10 Extensions aren't so limited. |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 <p>If the extension attempts to use a security origin other than itself, | 29 <p>If the extension attempts to use a security origin other than itself, |
30 say http://www.google.com, | 30 say http://www.google.com, |
31 the browser disallows it | 31 the browser disallows it |
32 unless the extension has requested the appropriate cross-origin permissions. | 32 unless the extension has requested the appropriate cross-origin permissions. |
33 </p> | 33 </p> |
34 | 34 |
35 <h2 id="requesting-permission">Requesting cross-origin permissions</h2> | 35 <h2 id="requesting-permission">Requesting cross-origin permissions</h2> |
36 | 36 |
37 <p>By adding hosts or host match patterns (or both) to the | 37 <p>By adding hosts or host match patterns (or both) to the |
38 <a href="manifest.html#permissions">permissions<a> section of the | 38 <a href="manifest.html#permissions">permissions</a> section of the |
39 <a href="manifest.html">manifest</a> file, the extension can request access to | 39 <a href="manifest.html">manifest</a> file, the extension can request access to |
40 remote servers outside of its origin.</p> | 40 remote servers outside of its origin.</p> |
41 | 41 |
42 <pre>"permissions": [ | 42 <pre>"permissions": [ |
43 "http://www.google.com/", | 43 "http://www.google.com/", |
44 ], | 44 ], |
45 </pre> | 45 </pre> |
46 | 46 |
47 <p>Cross-origin permission values can be fully qualified host names, | 47 <p>Cross-origin permission values can be fully qualified host names, |
48 like these:</p> | 48 like these:</p> |
49 | 49 |
(...skipping 21 matching lines...) Expand all Loading... |
71 of hosts, it must declare the permissions separately:</p> | 71 of hosts, it must declare the permissions separately:</p> |
72 | 72 |
73 <pre>"permissions": [ | 73 <pre>"permissions": [ |
74 "http://www.google.com/", | 74 "http://www.google.com/", |
75 "https://www.google.com/", | 75 "https://www.google.com/", |
76 ], | 76 ], |
77 </pre> | 77 </pre> |
78 | 78 |
79 | 79 |
80 <!-- END AUTHORED CONTENT --> | 80 <!-- END AUTHORED CONTENT --> |
OLD | NEW |