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

Side by Side Diff: chrome/common/extensions/docs/templates/intros/devtools_network.html

Issue 2179673002: Clean up DevTools API docs following removal of old APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months 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
OLDNEW
1 <p> 1 <p>
2 See <a href="devtools">DevTools APIs summary</a> for 2 See <a href="devtools">DevTools APIs summary</a> for
3 general introduction to using Developer Tools APIs</a>. 3 general introduction to using Developer Tools APIs</a>.
4 </p> 4 </p>
5 5
6 <h2 id="overview">Overview</h2> 6 <h2 id="overview">Overview</h2>
7 7
8 <p> 8 <p>
9 Network requests information is represented in the HTTP Archive format 9 Network requests information is represented in the HTTP Archive format
10 (<em>HAR</em>). The description of HAR is outside of scope of this document, 10 (<em>HAR</em>). The description of HAR is outside of scope of this document,
(...skipping 18 matching lines...) Expand all
29 requests returned by <code>getHAR()</code> should match that displayed in 29 requests returned by <code>getHAR()</code> should match that displayed in
30 the Network panel. 30 the Network panel.
31 <h2 id="overview-examples">Examples</h2> 31 <h2 id="overview-examples">Examples</h2>
32 32
33 <p>The following code logs URLs of all images larger than 40KB as they are 33 <p>The following code logs URLs of all images larger than 40KB as they are
34 loaded:</p> 34 loaded:</p>
35 35
36 <pre> 36 <pre>
37 chrome.devtools.network.onRequestFinished.addListener( 37 chrome.devtools.network.onRequestFinished.addListener(
38 function(request) { 38 function(request) {
39 if (request.response.bodySize > 40*1024) 39 if (request.response.bodySize > 40*1024) {
40 chrome.experimental.devtools.console.addMessage( 40 chrome.devtools.inspectedWindow.eval(
41 chrome.experimental.devtools.console.Severity.Warning, 41 'console.log("Large image: " + unescape("' +
42 "Large image: " + request.request.url); 42 escape(request.request.url) + '"))');
43 }
43 }); 44 });
44 </pre> 45 </pre>
45 46
46 <p> 47 <p>
47 You can find more examples that use this API in 48 You can find more examples that use this API in
48 <a href="samples#search:devtools.network">Samples</a>. 49 <a href="samples#search:devtools.network">Samples</a>.
49 </p> 50 </p>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698