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 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 Defines an collection of app or extension pages that are to be served | 945 Defines an collection of app or extension pages that are to be served |
946 in a sandboxed unique origin, and optionally a Content Security Policy to use | 946 in a sandboxed unique origin, and optionally a Content Security Policy to use |
947 with them. Being in a sandbox has two implications: | 947 with them. Being in a sandbox has two implications: |
948 </p> | 948 </p> |
949 <ol> | 949 <ol> |
950 <li>A sandboxed page will not have access to extension or app APIs, or | 950 <li>A sandboxed page will not have access to extension or app APIs, or |
951 direct access to non-sandboxed pages (it may communicate with them via | 951 direct access to non-sandboxed pages (it may communicate with them via |
952 <code>postMessage()</code>).</li> | 952 <code>postMessage()</code>).</li> |
953 <li> | 953 <li> |
954 <p>A sandboxed page is not subject to the | 954 <p>A sandboxed page is not subject to the |
955 <a href="../extensions/contentSecurityPolicy.html">Content Security Policy (CS
P)</a> used | 955 <a href="../extensions/contentSecurityPolicy.html">Content Security Policy |
956 by the rest of the app or extension (it has its own separate CSP value). This | 956 (CSP)</a> used by the rest of the app or extension (it has its own separate |
957 means that, for example, it can use inline script and <code>eval</code>.</p> | 957 CSP value). This means that, for example, it can use inline script and |
| 958 <code>eval</code>.</p> |
958 <p>For example, here's how to specify that two extension pages are to be | 959 <p>For example, here's how to specify that two extension pages are to be |
959 served in a sandbox with a custom CSP:</p> | 960 served in a sandbox with a custom CSP:</p> |
960 <pre>{ | 961 <pre>{ |
961 ... | 962 ... |
962 "sandbox": { | 963 "sandbox": { |
963 "pages": [ | 964 "pages": [ |
964 "page1.html", | 965 "page1.html", |
965 "directory/page2.html" | 966 "directory/page2.html" |
966 ] | 967 ] |
967 <i>// content_security_policy is optional.</i> | 968 <i>// content_security_policy is optional.</i> |
(...skipping 16 matching lines...) Expand all Loading... |
984 Note that you only need to list pages that you expected to be loaded in | 985 Note that you only need to list pages that you expected to be loaded in |
985 windows or frames. Resources used by sandboxed pages (e.g. stylesheets or | 986 windows or frames. Resources used by sandboxed pages (e.g. stylesheets or |
986 JavaScript source files) do not need to appear in the | 987 JavaScript source files) do not need to appear in the |
987 <code>sandboxed_page</code> list, they will use the sandbox of the page | 988 <code>sandboxed_page</code> list, they will use the sandbox of the page |
988 that embeds them. | 989 that embeds them. |
989 </p> | 990 </p> |
990 <p> | 991 <p> |
991 <a href="sandboxingEval.html">"Using eval in Chrome Extensions. Safely."</a> | 992 <a href="sandboxingEval.html">"Using eval in Chrome Extensions. Safely."</a> |
992 goes into more detail about implementing a sandboxing workflow that enables use | 993 goes into more detail about implementing a sandboxing workflow that enables use |
993 of libraries that would otherwise have issues executing under extension's | 994 of libraries that would otherwise have issues executing under extension's |
994 <a href="../extensions/contentSecurityPolicy.html">default Content Security Poli
cy</a>. | 995 <a href="../extensions/contentSecurityPolicy.html">default Content Security |
| 996 Policy</a>. |
995 </p> | 997 </p> |
996 <p> | 998 <p> |
997 Sandboxed page may only be specified when using | 999 Sandboxed page may only be specified when using |
998 <a href="#manifest_version"><code>manifest_version</code></a> 2 or above. | 1000 <a href="#manifest_version"><code>manifest_version</code></a> 2 or above. |
999 </p> | 1001 </p> |
1000 </div> | 1002 </div> |
1001 <!-- API PAGE --> | 1003 <!-- API PAGE --> |
1002 <!-- /apiPage --> | 1004 <!-- /apiPage --> |
1003 </div> <!-- /gc-pagecontent --> | 1005 </div> <!-- /gc-pagecontent --> |
1004 </div> <!-- /g-section --> | 1006 </div> <!-- /g-section --> |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1039 _uff=0; | 1041 _uff=0; |
1040 urchinTracker(); | 1042 urchinTracker(); |
1041 } | 1043 } |
1042 catch(e) {/* urchinTracker not available. */} | 1044 catch(e) {/* urchinTracker not available. */} |
1043 </script> | 1045 </script> |
1044 <!-- end analytics --> | 1046 <!-- end analytics --> |
1045 </div> | 1047 </div> |
1046 </div> <!-- /gc-footer --> | 1048 </div> <!-- /gc-footer --> |
1047 </div> <!-- /gc-container --> | 1049 </div> <!-- /gc-container --> |
1048 </body></html> | 1050 </body></html> |
OLD | NEW |