Index: chrome/common/extensions/docs/devtools.inspectedWindow.html |
diff --git a/chrome/common/extensions/docs/devtools.inspectedWindow.html b/chrome/common/extensions/docs/devtools.inspectedWindow.html |
deleted file mode 100644 |
index 8e3456187642a1f40d026128520b77d8692afc26..0000000000000000000000000000000000000000 |
--- a/chrome/common/extensions/docs/devtools.inspectedWindow.html |
+++ /dev/null |
@@ -1,1198 +0,0 @@ |
-<!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note: |
- 1) The <head> information in this page is significant, should be uniform |
- across api docs and should be edited only with knowledge of the |
- templating mechanism. |
- 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a |
- browser, it will be re-generated from the template, json schema and |
- authored overview content. |
- 4) The <body>.innerHTML is also generated by an offline step so that this |
- page may easily be indexed by search engines. |
---><html xmlns="http://www.w3.org/1999/xhtml"><head> |
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
- <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css"> |
- <link href="css/print.css" rel="stylesheet" type="text/css" media="print"> |
- <script type="text/javascript" src="../../../third_party/jstemplate/jstemplate_compiled.js"> |
- </script> |
- <script type="text/javascript" src="../../../../third_party/json_minify/minify-sans-regexp.js"> |
- </script> |
- <script type="text/javascript" src="js/api_page_generator.js"></script> |
- <script type="text/javascript" src="js/bootstrap.js"></script> |
- <script type="text/javascript" src="js/sidebar.js"></script> |
- <meta name="description" content="Documentation for the chrome.devtools.inspectedWindow module, which is part of the Google Chrome extension APIs."><title>chrome.devtools.inspectedWindow.* APIs - Google Chrome Extensions - Google Code</title></head> |
- <body> <div id="devModeWarning" class="displayModeWarning"> |
- You are viewing extension docs in chrome via the 'file:' scheme: are you expecting to see local changes when you refresh? You'll need run chrome with --allow-file-access-from-files. |
- </div> |
- <div id="branchWarning" class="displayModeWarning"> |
- <span>WARNING: This is the <span id="branchName">BETA</span> documentation. |
- It may not work with the stable release of Chrome.</span> |
- <select id="branchChooser"> |
- <option>Choose a different version... |
- </option><option value="">Stable |
- </option><option value="beta">Beta |
- </option><option value="dev">Dev |
- </option><option value="trunk">Trunk |
- </option></select> |
- </div> |
- <div id="unofficialWarning" class="displayModeWarning"> |
- <span>WARNING: This is unofficial documentation. It may not work with the |
- current release of Chrome.</span> |
- <button id="goToOfficialDocs">Go to the official docs</button> |
- </div> |
- <div id="gc-container" class="labs"> |
- <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION --> |
- <!-- In particular, sub-templates that recurse, must be used by allowing |
- jstemplate to make a copy of the template in this section which |
- are not operated on by way of the jsskip="true" --> |
- <!-- /SUBTEMPLATES --> |
- <a id="top"></a> |
- <div id="skipto"> |
- <a href="#gc-pagecontent">Skip to page content</a> |
- <a href="#gc-toc">Skip to main navigation</a> |
- </div> |
- <!-- API HEADER --> |
- <table id="header" width="100%" cellspacing="0" border="0"> |
- <tbody><tr> |
- <td valign="middle"><a href="http://code.google.com/"><img src="images/code_labs_logo.gif" height="43" width="161" alt="Google Code Labs" style="border:0; margin:0;"></a></td> |
- <td valign="middle" width="100%" style="padding-left:0.6em;"> |
- <form action="http://www.google.com/cse" id="cse" style="margin-top:0.5em"> |
- <div id="gsc-search-box"> |
- <input type="hidden" name="cx" value="002967670403910741006:61_cvzfqtno"> |
- <input type="hidden" name="ie" value="UTF-8"> |
- <input type="text" name="q" value="" size="55"> |
- <input class="gsc-search-button" type="submit" name="sa" value="Search"> |
- <br> |
- <span class="greytext">e.g. "page action" or "tabs"</span> |
- </div> |
- </form> |
- <script type="text/javascript" src="https://www.google.com/jsapi"></script> |
- <script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script> |
- <script type="text/javascript" src="https://www.google.com/coop/cse/t13n?form=cse&t13n_langs=en"></script> |
- <script type="text/javascript" src="https://www.google.com/coop/cse/brand?form=cse&lang=en"></script> |
- </td> |
- </tr> |
- </tbody></table> |
- <div id="codesiteContent" class=""> |
- <a id="gc-topnav-anchor"></a> |
- <div id="gc-topnav"> |
- <h1>Google Chrome Extensions (<a href="http://code.google.com/labs/">Labs</a>)</h1> |
- <ul id="home" class="gc-topnav-tabs"> |
- <li id="home_link"> |
- <a href="index.html" title="Google Chrome Extensions home page">Home</a> |
- </li> |
- <li id="docs_link"> |
- <a href="docs.html" title="Official Google Chrome Extensions documentation">Docs</a> |
- </li> |
- <li id="faq_link"> |
- <a href="faq.html" title="Answers to frequently asked questions about Google Chrome Extensions">FAQ</a> |
- </li> |
- <li id="samples_link"> |
- <a href="samples.html" title="Sample extensions (with source code)">Samples</a> |
- </li> |
- <li id="group_link"> |
- <a href="http://groups.google.com/a/chromium.org/group/chromium-extensions" title="Google Chrome Extensions developer forum">Group</a> |
- </li> |
- <li id="so_link"> |
- <a href="http://stackoverflow.com/questions/tagged/google-chrome-extension" title="[google-chrome-extension] tag on Stack Overflow">Questions?</a> |
- </li> |
- </ul> |
- </div> <!-- end gc-topnav --> |
- <div class="g-section g-tpl-170"> |
- <!-- SIDENAV --> |
- <div class="g-unit g-first" id="gc-toc"> |
- <ul> |
- <li><a href="getstarted.html">Getting Started</a></li> |
- <li><a href="overview.html">Overview</a></li> |
- <li><a href="whats_new.html">What's New?</a></li> |
- <li><h2><a href="devguide.html">Developer's Guide</a></h2> |
- <ul> |
- <li>Browser UI |
- <ul> |
- <li><a href="browserAction.html">Browser Actions</a></li> |
- <li><a href="contextMenus.html">Context Menus</a></li> |
- <li><a href="notifications.html">Desktop Notifications</a></li> |
- <li><a href="omnibox.html">Omnibox</a></li> |
- <li><a href="options.html">Options Pages</a></li> |
- <li><a href="override.html">Override Pages</a></li> |
- <li><a href="pageAction.html">Page Actions</a></li> |
- </ul> |
- </li> |
- <li>Browser Interaction |
- <ul> |
- <li><a href="bookmarks.html">Bookmarks</a></li> |
- <li><a href="cookies.html">Cookies</a></li> |
- <li><a href="devtools.html">Developer Tools</a></li> |
- <li><a href="events.html">Events</a></li> |
- <li><a href="history.html">History</a></li> |
- <li><a href="management.html">Management</a></li> |
- <li><a href="tabs.html">Tabs</a></li> |
- <li><a href="windows.html">Windows</a></li> |
- </ul> |
- </li> |
- <li>Implementation |
- <ul> |
- <li><a href="a11y.html">Accessibility</a></li> |
- <li><a href="background_pages.html">Background Pages</a></li> |
- <li><a href="content_scripts.html">Content Scripts</a></li> |
- <li><a href="xhr.html">Cross-Origin XHR</a></li> |
- <li><a href="i18n.html">Internationalization</a></li> |
- <li><a href="messaging.html">Message Passing</a></li> |
- <li><a href="permissions.html">Optional Permissions</a></li> |
- <li><a href="npapi.html">NPAPI Plugins</a></li> |
- </ul> |
- </li> |
- <li>Finishing |
- <ul> |
- <li><a href="hosting.html">Hosting</a></li> |
- <li><a href="external_extensions.html">Other Deployment Options</a></li> |
- </ul> |
- </li> |
- </ul> |
- </li> |
- <li><h2><a href="apps.html">Packaged Apps</a></h2></li> |
- <li><h2><a href="tutorials.html">Tutorials</a></h2> |
- <ul> |
- <li><a href="tut_debugging.html">Debugging</a></li> |
- <li><a href="tut_analytics.html">Google Analytics</a></li> |
- <li><a href="tut_oauth.html">OAuth</a></li> |
- </ul> |
- </li> |
- <li><h2>Reference</h2> |
- <ul> |
- <li>Formats |
- <ul> |
- <li><a href="manifest.html">Manifest Files</a></li> |
- <li><a href="match_patterns.html">Match Patterns</a></li> |
- </ul> |
- </li> |
- <li><a href="permission_warnings.html">Permission Warnings</a></li> |
- <li><a href="api_index.html">chrome.* APIs</a></li> |
- <li><a href="api_other.html">Other APIs</a></li> |
- </ul> |
- </li> |
- <li><h2><a href="samples.html">Samples</a></h2></li> |
- <div class="line"> </div> |
- <li><h2>More</h2> |
- <ul> |
- <li><a href="http://code.google.com/chrome/webstore/docs/index.html">Chrome Web Store</a></li> |
- <li><a href="http://code.google.com/chrome/apps/docs/developers_guide.html">Hosted Apps</a></li> |
- <li><a href="themes.html">Themes</a></li> |
- </ul> |
- </li> |
- </ul> |
- </div> |
- <script> |
- initToggles(); |
- </script> |
- <div class="g-unit" id="gc-pagecontent"> |
- <div id="pageTitle"> |
- <h1 class="page_title">chrome.devtools.inspectedWindow.* APIs</h1> |
- </div> |
- <!-- TABLE OF CONTENTS --> |
- <div id="toc"> |
- <h2>Contents</h2> |
- <ol> |
- <li> |
- <a href="#H2-0">Overview</a> |
- <ol> |
- </ol> |
- </li><li> |
- <a href="#overview-examples">Examples</a> |
- <ol> |
- </ol> |
- </li> |
- <li> |
- <a href="#apiReference">API reference: chrome.devtools.inspectedWindow</a> |
- <ol> |
- <li> |
- <a href="#properties">Properties</a> |
- <ol> |
- <li> |
- <a href="#property-tabId">tabId</a> |
- </li> |
- </ol> |
- </li> |
- <li> |
- <a href="#global-methods">Methods</a> |
- <ol> |
- <li> |
- <a href="#method-eval">eval</a> |
- </li><li> |
- <a href="#method-getResources">getResources</a> |
- </li><li> |
- <a href="#method-reload">reload</a> |
- </li> |
- </ol> |
- </li> |
- <li> |
- <a href="#global-events">Events</a> |
- <ol> |
- <li> |
- <a href="#event-onResourceAdded">onResourceAdded</a> |
- </li><li> |
- <a href="#event-onResourceContentCommitted">onResourceContentCommitted</a> |
- </li> |
- </ol> |
- </li> |
- <li> |
- <a href="#types">Types</a> |
- <ol> |
- <li> |
- <a href="#type-Resource">Resource</a> |
- <ol> |
- <li> |
- <a href="#global-Resource-methods">Methods</a> |
- <ol> |
- <li> |
- <a href="#method-Resource-getContent">getContent</a> |
- </li><li> |
- <a href="#method-Resource-setContent">setContent</a> |
- </li> |
- </ol> |
- </li> |
- </ol> |
- </li> |
- </ol> |
- </li> |
- </ol> |
- </li> |
- </ol> |
- </div> |
- <!-- /TABLE OF CONTENTS --> |
- <!-- Standard content lead-in for experimental API pages --> |
- <!-- STATIC CONTENT PLACEHOLDER --> |
- <div id="static"><div id="pageData-name" class="pageData">chrome.devtools.inspectedWindow.* APIs</div> |
-<p> |
-Use <code>chrome.devtools.inspectedWindow</code> |
-to interact with the inspected window: |
-obtain the tab ID for the inspected page, |
-evaluate the code in the context of inspected window, |
-reload the page, |
-or obtain the list of resources within the page. |
-</p><p> |
-See <a href="devtools.html">DevTools APIs summary</a> for |
-general introduction to using Developer Tools APIs. |
-</p> |
-<a name="H2-0"></a><h2>Overview</h2> |
-<p> |
-The <a href="#property-tabId"><code>tabId</code></a> property |
-provides the tab identifier that you can use with the |
-<a href="tabs.html"><code>chrome.tabs.*</code></a> API calls. |
-However, please note that <code>chrome.tabs.*</code> API is not |
-exposed to the Developer Tools extension pages due to security considerations |
-— you will need to pass the tab ID to the background page and invoke |
-the <code>chrome.tabs.*</code> API functions from there. |
-</p> |
-<p> |
-The <code>eval()</code> method provides the ability for extensions to execute |
-JavaScript code in the context of the main frame of the inspected page. |
-This method is powerful when used in the right context |
-and dangerous when used inappropriately. |
-Use the <code>chrome.tabs.executeScript()</code> method |
-unless you need the specific functionality |
-that the <code>eval()</code> method provides. |
-</p> |
-<p>Here are the main differences between the |
-<code>eval()</code> and <code>chrome.tabs.executeScript()</code> methods: |
-</p><ul> |
-<li>The <code>eval()</code> method does not |
-use an isolated world for the code being evaluated, so the JavaScript state |
-of the inspected window is accessible to the code. |
-Use this method when access to the JavaScript state of the inspected page |
-is required. |
-</li><li> |
-The execution context of the code being evaluated includes the |
-<a href="http://code.google.com/chrome/devtools/docs/console.html">Developer |
-Tools console API</a>. |
-For example, |
-the code can use <code>inspect()</code> and <code>$0</code>. |
-</li><li> |
-The evaluated code may return a value that is passed to the extension callback. |
-The returned value has to be a valid JSON object (it may contain only |
-primitive JavaScript types and acyclic references to other JSON |
-objects). |
-<em>Please observe extra care while processing the data received from the |
-inspected page — the execution context is essentially controlled by the |
-inspected page; a malicious page may affect the data being returned to the |
-extension.</em> |
-</li></ul> |
-<p class="caution"> |
-<strong>Important:</strong> |
-Due to the security considerations explained above, the |
-<a href="tabs.html#method-executeScript"><code>chrome.tabs.executeScript()</code></a> method is the preferred way for an |
-extension to access DOM data of the inspected page in cases where the access to |
-JavaScript state of the inspected page is not required. |
-</p><p> |
-The <code>reload()</code> method may be used to reload the inspected page. |
-Additionally, the caller can specify an override for the user agent string, |
-a script that will be injected early upon page load, and an option to force |
-reload of cached resources. |
-</p><p> |
-Use the <code>getResources()</code> call and the <code>onResourceContent</code> |
-event to obtain the list of resources (documents, stylesheets, scripts, images |
-etc) within the inspected page. The <code>getContent()</code> and <code>setContent()</code> methods of the <code>Resource</code> class along with the |
-<code>onResourceContentCommitted</code> event may be used to support |
-modification of the resource content, for example, by an external editor. |
-</p> |
-<h2 id="overview-examples">Examples</h2> |
-<p>The following code checks for the version of jQuery used by the inspected |
-page: |
-</p><pre>chrome.devtools.inspectedWindow.eval( |
- "jQuery.fn.jquery", |
- function(result, isException) { |
- if (isException) |
- console.log("the page is not using jQuery"); |
- else |
- console.log("The page is using jQuery v" + result); |
- } |
-); |
-</pre> |
-<p> |
-You can find more examples that use Developer Tools APIs in |
-<a href="samples.html#devtools">Samples</a>. |
-</p> |
-</div> |
- <!-- API PAGE --> |
- <div class="apiPage"> |
- <a name="apiReference"></a> |
- <h2>API reference: chrome.devtools.inspectedWindow</h2> |
- <!-- PROPERTIES --> |
- <div class="apiGroup"> |
- <a name="properties"></a> |
- <h3 id="properties">Properties</h3> |
- <div> |
- <a name="property-tabId"></a> |
- <h4>tabId</h4> |
- <div class="summary"> |
- <!-- Note: intentionally longer 80 columns --> |
- <span>chrome.devtools.inspectedWindow.</span><span>tabId</span> |
- </div> |
- <div> |
- <dt> |
- <var>tabId</var> |
- <em> |
- <!-- TYPE --> |
- <div style="display:inline"> |
- ( |
- <span id="typeTemplate"> |
- <span> |
- <span>integer</span> |
- </span> |
- </span> |
- ) |
- </div> |
- </em> |
- </dt> |
- <dd>The ID of the tab being inspected. This ID may be used with chrome.tabs.* API.</dd> |
- <!-- OBJECT PROPERTIES --> |
- <!-- OBJECT METHODS --> |
- <!-- OBJECT EVENT FIELDS --> |
- <!-- FUNCTION PARAMETERS --> |
- </div> |
- </div> |
- </div> <!-- /apiGroup --> |
- <!-- METHODS --> |
- <div id="methodsTemplate" class="apiGroup"> |
- <a name="global-methods"></a> |
- <h3>Methods</h3> |
- <!-- iterates over all functions --> |
- <div class="apiItem"> |
- <a name="method-eval"></a> <!-- method-anchor --> |
- <h4>eval</h4> |
- <div class="summary"> |
- <!-- Note: intentionally longer 80 columns --> |
- <span>chrome.devtools.inspectedWindow.eval</span>(<span class="null"><span>string</span> |
- <var><span>expression</span></var></span><span class="optional"><span>, </span><span>function</span> |
- <var><span>callback</span></var></span>)</div> |
- <div class="description"> |
- <p>Evaluates a JavaScript expression in the context of the main frame of the inspected page. The expression must evaluate to a JSON-compliant object, otherwise an exception is thrown.</p> |
- <!-- PARAMETERS --> |
- <h4>Parameters</h4> |
- <dl> |
- <div> |
- <div> |
- <dt> |
- <var>expression</var> |
- <em> |
- <!-- TYPE --> |
- <div style="display:inline"> |
- ( |
- <span id="typeTemplate"> |
- <span> |
- <span>string</span> |
- </span> |
- </span> |
- ) |
- </div> |
- </em> |
- </dt> |
- <dd>An expression to evaluate.</dd> |
- <!-- OBJECT PROPERTIES --> |
- <!-- OBJECT METHODS --> |
- <!-- OBJECT EVENT FIELDS --> |
- <!-- FUNCTION PARAMETERS --> |
- </div> |
- </div><div> |
- <div> |
- <dt> |
- <var>callback</var> |
- <em> |
- <!-- TYPE --> |
- <div style="display:inline"> |
- ( |
- <span class="optional">optional</span> |
- <span id="typeTemplate"> |
- <span> |
- <span>function</span> |
- </span> |
- </span> |
- ) |
- </div> |
- </em> |
- </dt> |
- <dd>A function called when evaluation completes.</dd> |
- <!-- OBJECT PROPERTIES --> |
- <!-- OBJECT METHODS --> |
- <!-- OBJECT EVENT FIELDS --> |
- <!-- FUNCTION PARAMETERS --> |
- </div> |
- </div> |
- </dl> |
- <!-- RETURNS --> |
- <dl> |
- </dl> |
- <!-- CALLBACK --> |
- <div> |
- <div> |
- <h4>Callback function</h4> |
- <p> |
- If you specify the <em>callback</em> parameter, it should |
- specify a function that looks like this: |
- </p> |
- <!-- Note: intentionally longer 80 columns --> |
- <pre>function(<span>object result, boolean isException</span>) <span class="subdued">{...}</span>;</pre> |
- <dl> |
- <div> |
- <div> |
- <dt> |
- <var>result</var> |
- <em> |
- <!-- TYPE --> |
- <div style="display:inline"> |
- ( |
- <span id="typeTemplate"> |
- <span> |
- <span>object</span> |
- </span> |
- </span> |
- ) |
- </div> |
- </em> |
- </dt> |
- <dd>The result of evaluation.</dd> |
- <!-- OBJECT PROPERTIES --> |
- <!-- OBJECT METHODS --> |
- <!-- OBJECT EVENT FIELDS --> |
- <!-- FUNCTION PARAMETERS --> |
- </div> |
- </div><div> |
- <div> |
- <dt> |
- <var>isException</var> |
- <em> |
- <!-- TYPE --> |
- <div style="display:inline"> |
- ( |
- <span id="typeTemplate"> |
- <span> |
- <span>boolean</span> |
- </span> |
- </span> |
- ) |
- </div> |
- </em> |
- </dt> |
- <dd>Set if an exception was caught while evaluating the expression.</dd> |
- <!-- OBJECT PROPERTIES --> |
- <!-- OBJECT METHODS --> |
- <!-- OBJECT EVENT FIELDS --> |
- <!-- FUNCTION PARAMETERS --> |
- </div> |
- </div> |
- </dl> |
- </div> |
- </div> |
- <!-- MIN_VERSION --> |
- </div> <!-- /description --> |
- </div><div class="apiItem"> |
- <a name="method-getResources"></a> <!-- method-anchor --> |
- <h4>getResources</h4> |
- <div class="summary"> |
- <!-- Note: intentionally longer 80 columns --> |
- <span>chrome.devtools.inspectedWindow.getResources</span>(<span class="null"><span>function</span> |
- <var><span>callback</span></var></span>)</div> |
- <div class="description"> |
- <p>Retrieves the list of resources from the inspected page.</p> |
- <!-- PARAMETERS --> |
- <h4>Parameters</h4> |
- <dl> |
- <div> |
- <div> |
- <dt> |
- <var>callback</var> |
- <em> |
- <!-- TYPE --> |
- <div style="display:inline"> |
- ( |
- <span id="typeTemplate"> |
- <span> |
- <span>function</span> |
- </span> |
- </span> |
- ) |
- </div> |
- </em> |
- </dt> |
- <dd>A function that receives the list of resources when the request completes.</dd> |
- <!-- OBJECT PROPERTIES --> |
- <!-- OBJECT METHODS --> |
- <!-- OBJECT EVENT FIELDS --> |
- <!-- FUNCTION PARAMETERS --> |
- </div> |
- </div> |
- </dl> |
- <!-- RETURNS --> |
- <dl> |
- </dl> |
- <!-- CALLBACK --> |
- <div> |
- <div> |
- <h4>Callback function</h4> |
- <p> |
- The <em>callback</em> parameter should specify a function |
- that looks like this: |
- </p> |
- <!-- Note: intentionally longer 80 columns --> |
- <pre>function(<span>array of Resource resources</span>) <span class="subdued">{...}</span>;</pre> |
- <dl> |
- <div> |
- <div> |
- <dt> |
- <var>resources</var> |
- <em> |
- <!-- TYPE --> |
- <div style="display:inline"> |
- ( |
- <span id="typeTemplate"> |
- <span> |
- <span> |
- array of <span><span> |
- <span> |
- <a href="devtools.inspectedWindow.html#type-Resource">Resource</a> |
- </span> |
- </span></span> |
- </span> |
- </span> |
- </span> |
- ) |
- </div> |
- </em> |
- </dt> |
- <dd>The resources within the page.</dd> |
- <!-- OBJECT PROPERTIES --> |
- <!-- OBJECT METHODS --> |
- <!-- OBJECT EVENT FIELDS --> |
- <!-- FUNCTION PARAMETERS --> |
- </div> |
- </div> |
- </dl> |
- </div> |
- </div> |
- <!-- MIN_VERSION --> |
- </div> <!-- /description --> |
- </div><div class="apiItem"> |
- <a name="method-reload"></a> <!-- method-anchor --> |
- <h4>reload</h4> |
- <div class="summary"> |
- <!-- Note: intentionally longer 80 columns --> |
- <span>chrome.devtools.inspectedWindow.reload</span>(<span class="optional"><span>object</span> |
- <var><span>reloadOptions</span></var></span>)</div> |
- <div class="description"> |
- <p>Reloads the inspected page.</p> |
- <!-- PARAMETERS --> |
- <h4>Parameters</h4> |
- <dl> |
- <div> |
- <div> |
- <dt> |
- <var>reloadOptions</var> |
- <em> |
- <!-- TYPE --> |
- <div style="display:inline"> |
- ( |
- <span class="optional">optional</span> |
- <span id="typeTemplate"> |
- <span> |
- <span>object</span> |
- </span> |
- </span> |
- ) |
- </div> |
- </em> |
- </dt> |
- <dd class="todo"> |
- Undocumented. |
- </dd> |
- <!-- OBJECT PROPERTIES --> |
- <dd> |
- <dl> |
- <div> |
- <div> |
- <dt> |
- <var>ignoreCache</var> |
- <em> |
- <!-- TYPE --> |
- <div style="display:inline"> |
- ( |
- <span class="optional">optional</span> |
- <span id="typeTemplate"> |
- <span> |
- <span>boolean</span> |
- </span> |
- </span> |
- ) |
- </div> |
- </em> |
- </dt> |
- <dd>When true, the loader will ignore the cache for all inspected page resources loaded before the <code>load</code> event is fired. The effect is similar to pressing Ctrl+Shift+R in the inspected window or within the Developer Tools window.</dd> |
- <!-- OBJECT PROPERTIES --> |
- <!-- OBJECT METHODS --> |
- <!-- OBJECT EVENT FIELDS --> |
- <!-- FUNCTION PARAMETERS --> |
- </div> |
- </div><div> |
- <div> |
- <dt> |
- <var>userAgent</var> |
- <em> |
- <!-- TYPE --> |
- <div style="display:inline"> |
- ( |
- <span class="optional">optional</span> |
- <span id="typeTemplate"> |
- <span> |
- <span>string</span> |
- </span> |
- </span> |
- ) |
- </div> |
- </em> |
- </dt> |
- <dd>If specified, the string will override the value of the <code>User-Agent</code> HTTP header that's sent while loading the resources of the inspected page. The string will also override the value of the <code>navigator.userAgent</code> property that's returned to any scripts that are running within the inspected page.</dd> |
- <!-- OBJECT PROPERTIES --> |
- <!-- OBJECT METHODS --> |
- <!-- OBJECT EVENT FIELDS --> |
- <!-- FUNCTION PARAMETERS --> |
- </div> |
- </div><div> |
- <div> |
- <dt> |
- <var>injectedScript</var> |
- <em> |
- <!-- TYPE --> |
- <div style="display:inline"> |
- ( |
- <span class="optional">optional</span> |
- <span id="typeTemplate"> |
- <span> |
- <span>string</span> |
- </span> |
- </span> |
- ) |
- </div> |
- </em> |
- </dt> |
- <dd>If specified, the script will be injected into every frame of the inspected page immediately upon load, before any of the frame's scripts. The script will not be injected after subsequent reloads—for example, if the user presses Ctrl+R.</dd> |
- <!-- OBJECT PROPERTIES --> |
- <!-- OBJECT METHODS --> |
- <!-- OBJECT EVENT FIELDS --> |
- <!-- FUNCTION PARAMETERS --> |
- </div> |
- </div> |
- </dl> |
- </dd> |
- <!-- OBJECT METHODS --> |
- <!-- OBJECT EVENT FIELDS --> |
- <!-- FUNCTION PARAMETERS --> |
- </div> |
- </div> |
- </dl> |
- <!-- RETURNS --> |
- <dl> |
- </dl> |
- <!-- CALLBACK --> |
- <!-- MIN_VERSION --> |
- </div> <!-- /description --> |
- </div> <!-- /apiItem --> |
- </div> <!-- /apiGroup --> |
- <!-- EVENTS --> |
- <div id="eventsTemplate" class="apiGroup"> |
- <a name="global-events"></a> |
- <h3>Events</h3> |
- <!-- iterates over all events --> |
- <div class="apiItem"> |
- <a name="event-onResourceAdded"></a> |
- <h4>onResourceAdded</h4> |
- <div class="summary"> |
- <!-- Note: intentionally longer 80 columns --> |
- <span class="subdued">chrome.devtools.inspectedWindow.</span><span>onResourceAdded</span><span class="subdued">.addListener</span>(function(<span>Resource resource</span>) <span class="subdued">{...}</span><span></span>); |
- </div> |
- <div class="description"> |
- <p>Fired when a new resource is added to the inspected page.</p> |
- <!-- LISTENER PARAMETERS --> |
- <div> |
- <h4>Listener parameters</h4> |
- <dl> |
- <div> |
- <div> |
- <dt> |
- <var>resource</var> |
- <em> |
- <!-- TYPE --> |
- <div style="display:inline"> |
- ( |
- <span id="typeTemplate"> |
- <span> |
- <a href="devtools.inspectedWindow.html#type-Resource">Resource</a> |
- </span> |
- </span> |
- ) |
- </div> |
- </em> |
- </dt> |
- <dd class="todo"> |
- Undocumented. |
- </dd> |
- <!-- OBJECT PROPERTIES --> |
- <!-- OBJECT METHODS --> |
- <!-- OBJECT EVENT FIELDS --> |
- <!-- FUNCTION PARAMETERS --> |
- </div> |
- </div> |
- </dl> |
- </div> |
- <!-- EXTRA PARAMETERS --> |
- <!-- LISTENER RETURN VALUE --> |
- <dl> |
- </dl> |
- </div> <!-- /description --> |
- <!-- /description --> |
- </div><div class="apiItem"> |
- <a name="event-onResourceContentCommitted"></a> |
- <h4>onResourceContentCommitted</h4> |
- <div class="summary"> |
- <!-- Note: intentionally longer 80 columns --> |
- <span class="subdued">chrome.devtools.inspectedWindow.</span><span>onResourceContentCommitted</span><span class="subdued">.addListener</span>(function(<span>Resource resource, string content</span>) <span class="subdued">{...}</span><span></span>); |
- </div> |
- <div class="description"> |
- <p>Fired when a new revision of the resource is committed (e.g. user saves an edited version of the resource in the Developer Tools).</p> |
- <!-- LISTENER PARAMETERS --> |
- <div> |
- <h4>Listener parameters</h4> |
- <dl> |
- <div> |
- <div> |
- <dt> |
- <var>resource</var> |
- <em> |
- <!-- TYPE --> |
- <div style="display:inline"> |
- ( |
- <span id="typeTemplate"> |
- <span> |
- <a href="devtools.inspectedWindow.html#type-Resource">Resource</a> |
- </span> |
- </span> |
- ) |
- </div> |
- </em> |
- </dt> |
- <dd class="todo"> |
- Undocumented. |
- </dd> |
- <!-- OBJECT PROPERTIES --> |
- <!-- OBJECT METHODS --> |
- <!-- OBJECT EVENT FIELDS --> |
- <!-- FUNCTION PARAMETERS --> |
- </div> |
- </div><div> |
- <div> |
- <dt> |
- <var>content</var> |
- <em> |
- <!-- TYPE --> |
- <div style="display:inline"> |
- ( |
- <span id="typeTemplate"> |
- <span> |
- <span>string</span> |
- </span> |
- </span> |
- ) |
- </div> |
- </em> |
- </dt> |
- <dd>New content of the resource.</dd> |
- <!-- OBJECT PROPERTIES --> |
- <!-- OBJECT METHODS --> |
- <!-- OBJECT EVENT FIELDS --> |
- <!-- FUNCTION PARAMETERS --> |
- </div> |
- </div> |
- </dl> |
- </div> |
- <!-- EXTRA PARAMETERS --> |
- <!-- LISTENER RETURN VALUE --> |
- <dl> |
- </dl> |
- </div> <!-- /description --> |
- <!-- /description --> |
- </div> <!-- /apiItem --> |
- </div> <!-- /apiGroup --> |
- <!-- TYPES --> |
- <div class="apiGroup"> |
- <a name="types"></a> |
- <h3 id="types">Types</h3> |
- <!-- iterates over all types --> |
- <div class="apiItem"> |
- <a name="type-Resource"></a> |
- <h4>Resource</h4> |
- <div> |
- <dt> |
- <em> |
- <!-- TYPE --> |
- <div style="display:inline"> |
- ( |
- <span id="typeTemplate"> |
- <span> |
- <span>object</span> |
- </span> |
- </span> |
- ) |
- </div> |
- </em> |
- </dt> |
- <dd>A resource within the inspected page, such as a document, a script, or an image.</dd> |
- <!-- OBJECT PROPERTIES --> |
- <dd> |
- <dl> |
- <div> |
- <div> |
- <dt> |
- <var>url</var> |
- <em> |
- <!-- TYPE --> |
- <div style="display:inline"> |
- ( |
- <span id="typeTemplate"> |
- <span> |
- <span>string</span> |
- </span> |
- </span> |
- ) |
- </div> |
- </em> |
- </dt> |
- <dd>The URL of the resource.</dd> |
- <!-- OBJECT PROPERTIES --> |
- <!-- OBJECT METHODS --> |
- <!-- OBJECT EVENT FIELDS --> |
- <!-- FUNCTION PARAMETERS --> |
- </div> |
- </div> |
- </dl> |
- </dd> |
- <!-- OBJECT METHODS --> |
- <dd> |
- <div class="apiGroup"> |
- <a name="global-Resource-methods"></a> |
- <h3>Methods of Resource</h3> |
- <!-- iterates over all functions --> |
- <div class="apiItem"> |
- <a name="method-Resource-getContent"></a> <!-- method-anchor --> |
- <h4>getContent</h4> |
- <div class="summary"> |
- <!-- Note: intentionally longer 80 columns --> |
- <span>resource.getContent</span>(<span class="null"><span>function</span> |
- <var><span>callback</span></var></span>)</div> |
- <div class="description"> |
- <p>Gets the content of the resource.</p> |
- <!-- PARAMETERS --> |
- <h4>Parameters</h4> |
- <dl> |
- <div> |
- <div> |
- <dt> |
- <var>callback</var> |
- <em> |
- <!-- TYPE --> |
- <div style="display:inline"> |
- ( |
- <span id="typeTemplate"> |
- <span> |
- <span>function</span> |
- </span> |
- </span> |
- ) |
- </div> |
- </em> |
- </dt> |
- <dd>A function that receives resource content when the request completes.</dd> |
- <!-- OBJECT PROPERTIES --> |
- <!-- OBJECT METHODS --> |
- <!-- OBJECT EVENT FIELDS --> |
- <!-- FUNCTION PARAMETERS --> |
- </div> |
- </div> |
- </dl> |
- <!-- RETURNS --> |
- <dl> |
- </dl> |
- <!-- CALLBACK --> |
- <div> |
- <div> |
- <h4>Callback function</h4> |
- <p> |
- The <em>callback</em> parameter should specify a function |
- that looks like this: |
- </p> |
- <!-- Note: intentionally longer 80 columns --> |
- <pre>function(<span>string content, string encoding</span>) <span class="subdued">{...}</span>;</pre> |
- <dl> |
- <div> |
- <div> |
- <dt> |
- <var>content</var> |
- <em> |
- <!-- TYPE --> |
- <div style="display:inline"> |
- ( |
- <span id="typeTemplate"> |
- <span> |
- <span>string</span> |
- </span> |
- </span> |
- ) |
- </div> |
- </em> |
- </dt> |
- <dd>Content of the resource (potentially encoded).</dd> |
- <!-- OBJECT PROPERTIES --> |
- <!-- OBJECT METHODS --> |
- <!-- OBJECT EVENT FIELDS --> |
- <!-- FUNCTION PARAMETERS --> |
- </div> |
- </div><div> |
- <div> |
- <dt> |
- <var>encoding</var> |
- <em> |
- <!-- TYPE --> |
- <div style="display:inline"> |
- ( |
- <span id="typeTemplate"> |
- <span> |
- <span>string</span> |
- </span> |
- </span> |
- ) |
- </div> |
- </em> |
- </dt> |
- <dd>Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported.</dd> |
- <!-- OBJECT PROPERTIES --> |
- <!-- OBJECT METHODS --> |
- <!-- OBJECT EVENT FIELDS --> |
- <!-- FUNCTION PARAMETERS --> |
- </div> |
- </div> |
- </dl> |
- </div> |
- </div> |
- <!-- MIN_VERSION --> |
- </div> <!-- /description --> |
- </div><div class="apiItem"> |
- <a name="method-Resource-setContent"></a> <!-- method-anchor --> |
- <h4>setContent</h4> |
- <div class="summary"> |
- <!-- Note: intentionally longer 80 columns --> |
- <span>resource.setContent</span>(<span class="null"><span>string</span> |
- <var><span>content</span></var></span><span class="null"><span>, </span><span>boolean</span> |
- <var><span>commit</span></var></span><span class="optional"><span>, </span><span>function</span> |
- <var><span>callback</span></var></span>)</div> |
- <div class="description"> |
- <p>Sets the content of the resource.</p> |
- <!-- PARAMETERS --> |
- <h4>Parameters</h4> |
- <dl> |
- <div> |
- <div> |
- <dt> |
- <var>content</var> |
- <em> |
- <!-- TYPE --> |
- <div style="display:inline"> |
- ( |
- <span id="typeTemplate"> |
- <span> |
- <span>string</span> |
- </span> |
- </span> |
- ) |
- </div> |
- </em> |
- </dt> |
- <dd>New content of the resource. Only resources with the text type are currently supported.</dd> |
- <!-- OBJECT PROPERTIES --> |
- <!-- OBJECT METHODS --> |
- <!-- OBJECT EVENT FIELDS --> |
- <!-- FUNCTION PARAMETERS --> |
- </div> |
- </div><div> |
- <div> |
- <dt> |
- <var>commit</var> |
- <em> |
- <!-- TYPE --> |
- <div style="display:inline"> |
- ( |
- <span id="typeTemplate"> |
- <span> |
- <span>boolean</span> |
- </span> |
- </span> |
- ) |
- </div> |
- </em> |
- </dt> |
- <dd>True if the user has finished editing the resource, and the new content of the resource should be persisted; false if this is a minor change sent in progress of the user editing the resource.</dd> |
- <!-- OBJECT PROPERTIES --> |
- <!-- OBJECT METHODS --> |
- <!-- OBJECT EVENT FIELDS --> |
- <!-- FUNCTION PARAMETERS --> |
- </div> |
- </div><div> |
- <div> |
- <dt> |
- <var>callback</var> |
- <em> |
- <!-- TYPE --> |
- <div style="display:inline"> |
- ( |
- <span class="optional">optional</span> |
- <span id="typeTemplate"> |
- <span> |
- <span>function</span> |
- </span> |
- </span> |
- ) |
- </div> |
- </em> |
- </dt> |
- <dd>A function called upon request completion.</dd> |
- <!-- OBJECT PROPERTIES --> |
- <!-- OBJECT METHODS --> |
- <!-- OBJECT EVENT FIELDS --> |
- <!-- FUNCTION PARAMETERS --> |
- </div> |
- </div> |
- </dl> |
- <!-- RETURNS --> |
- <dl> |
- </dl> |
- <!-- CALLBACK --> |
- <div> |
- <div> |
- <h4>Callback function</h4> |
- <p> |
- If you specify the <em>callback</em> parameter, it should |
- specify a function that looks like this: |
- </p> |
- <!-- Note: intentionally longer 80 columns --> |
- <pre>function(<span>object error</span>) <span class="subdued">{...}</span>;</pre> |
- <dl> |
- <div> |
- <div> |
- <dt> |
- <var>error</var> |
- <em> |
- <!-- TYPE --> |
- <div style="display:inline"> |
- ( |
- <span class="optional">optional</span> |
- <span id="typeTemplate"> |
- <span> |
- <span>object</span> |
- </span> |
- </span> |
- ) |
- </div> |
- </em> |
- </dt> |
- <dd>Set to undefined if the resource content was set successfully; describes error otherwise.</dd> |
- <!-- OBJECT PROPERTIES --> |
- <!-- OBJECT METHODS --> |
- <!-- OBJECT EVENT FIELDS --> |
- <!-- FUNCTION PARAMETERS --> |
- </div> |
- </div> |
- </dl> |
- </div> |
- </div> |
- <!-- MIN_VERSION --> |
- </div> <!-- /description --> |
- </div> <!-- /apiItem --> |
- </div> |
- </dd> |
- <!-- OBJECT EVENT FIELDS --> |
- <!-- FUNCTION PARAMETERS --> |
- </div> |
- </div> <!-- /apiItem --> |
- </div> <!-- /apiGroup --> |
- </div> <!-- /apiPage --> |
- </div> <!-- /gc-pagecontent --> |
- </div> <!-- /g-section --> |
- </div> <!-- /codesiteContent --> |
- <div id="gc-footer" --=""> |
- <div class="text"> |
- <p> |
- Except as otherwise <a href="http://code.google.com/policies.html#restrictions">noted</a>, |
- the content of this page is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons |
- Attribution 3.0 License</a>, and code samples are licensed under the |
- <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD License</a>. |
- </p> |
- <p> |
- ©2011 Google |
- </p> |
-<!-- begin analytics --> |
-<script src="https://www.google-analytics.com/urchin.js" type="text/javascript"></script> |
-<script src="https://www.google-analytics.com/ga.js" type="text/javascript"></script> |
-<script type="text/javascript"> |
- // chrome doc tracking |
- try { |
- var engdocs = _gat._getTracker("YT-10763712-2"); |
- engdocs._trackPageview(); |
- } catch(err) {} |
- // code.google.com site-wide tracking |
- try { |
- _uacct="UA-18071-1"; |
- _uanchor=1; |
- _uff=0; |
- urchinTracker(); |
- } |
- catch(e) {/* urchinTracker not available. */} |
-</script> |
-<!-- end analytics --> |
- </div> |
- </div> <!-- /gc-footer --> |
- </div> <!-- /gc-container --> |
-</body></html> |