Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1136)

Side by Side Diff: chrome/common/extensions/docs/static/content_scripts.html

Issue 426014: Merge 32770 - Revert change that disallowed content scripts access to... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/249/src/
Patch Set: Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <div id="pageData-title" class="pageData">Content Scripts</div> 1 <div id="pageData-title" class="pageData">Content Scripts</div>
2 <div id="pageData-showTOC" class="pageData">true</div> 2 <div id="pageData-showTOC" class="pageData">true</div>
3 3
4 <p> 4 <p>
5 Content scripts are JavaScript files that run in the context of web pages. 5 Content scripts are JavaScript files that run in the context of web pages.
6 By using the standard 6 By using the standard
7 <a href="http://www.w3.org/TR/DOM-Level-2-HTML/">Document 7 <a href="http://www.w3.org/TR/DOM-Level-2-HTML/">Document
8 Object Model</a> (DOM), 8 Object Model</a> (DOM),
9 they can read details of the web pages the browser visits, 9 they can read details of the web pages the browser visits,
10 or make changes to them. 10 or make changes to them.
(...skipping 22 matching lines...) Expand all
33 </li> 33 </li>
34 <li> 34 <li>
35 Use variables or functions defined by their extension's pages 35 Use variables or functions defined by their extension's pages
36 </li> 36 </li>
37 <li> 37 <li>
38 Use variables or functions defined by web pages or by other content scripts 38 Use variables or functions defined by web pages or by other content scripts
39 </li> 39 </li>
40 <li> 40 <li>
41 Make cross-site XMLHttpRequests 41 Make cross-site XMLHttpRequests
42 </li> 42 </li>
43 <li>
44 Execute on file:// urls.
45 </li>
46 </ul> 43 </ul>
47 44
48 <p> 45 <p>
49 These limitations aren't as bad as they sound. 46 These limitations aren't as bad as they sound.
50 Content scripts can <em>indirectly</em> use the chrome.* APIs, 47 Content scripts can <em>indirectly</em> use the chrome.* APIs,
51 get access to extension data, 48 get access to extension data,
52 and request extension actions 49 and request extension actions
53 by exchanging <a href="messaging.html">messages</a> 50 by exchanging <a href="messaging.html">messages</a>
54 with their parent extension. 51 with their parent extension.
55 Content scripts can also 52 Content scripts can also
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 just like you would any other URL, 249 just like you would any other URL,
253 as the following code shows. 250 as the following code shows.
254 </p> 251 </p>
255 252
256 253
257 <pre> 254 <pre>
258 <em>//Code for displaying &lt;extensionDir>/images/myimage.png:</em> 255 <em>//Code for displaying &lt;extensionDir>/images/myimage.png:</em>
259 var imgURL = <b>chrome.extension.getURL("images/myimage.png")</b>; 256 var imgURL = <b>chrome.extension.getURL("images/myimage.png")</b>;
260 document.getElementById("someImage").src = imgURL; 257 document.getElementById("someImage").src = imgURL;
261 </pre> 258 </pre>
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/content_scripts.html ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698