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

Side by Side Diff: telemetry/third_party/snap-it/content_script.js

Issue 3010063002: [Telemetry] Add script to snapshot page's HTML (Closed)
Patch Set: fix --interactive flag spec Created 3 years, 3 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
(Empty)
1 /**
2 * Send the neccessary HTMLSerializer properties back to the extension.
3 *
4 * @param {HTMLSerializer} htmlSerializer The HTMLSerializer.
5 */
6 function sendHTMLSerializerToExtension(htmlSerializer) {
7 var result = {
8 'html': htmlSerializer.html,
9 'frameHoles': htmlSerializer.frameHoles,
10 'idToStyleIndex': htmlSerializer.idToStyleIndex,
11 'idToStyleMap': htmlSerializer.idToStyleMap,
12 'windowHeight': htmlSerializer.windowHeight,
13 'windowWidth': htmlSerializer.windowWidth,
14 'rootId': htmlSerializer.rootId,
15 'rootStyleIndex': htmlSerializer.rootStyleIndex,
16 'pseudoElementSelectorToCSSMap':
17 htmlSerializer.pseudoElementSelectorToCSSMap,
18 'pseudoElementPlaceHolderIndex':
19 htmlSerializer.pseudoElementPlaceHolderIndex,
20 'pseudoElementTestingStyleIndex':
21 htmlSerializer.pseudoElementStyleTestingIndex,
22 'pseudoElementTestingStyleId': htmlSerializer.pseudoElementTestingStyleId,
23 'unusedId': htmlSerializer.generateId(document),
24 'frameIndex': htmlSerializer.iframeFullyQualifiedName(window)
25 };
26 chrome.runtime.sendMessage(result);
27 }
28
29 var htmlSerializer = new HTMLSerializer();
30 htmlSerializer.processDocument(document);
31 htmlSerializer.fillHolesAsync(document, sendHTMLSerializerToExtension);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698