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

Unified Diff: third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js

Issue 2571713005: DevTools: untruncate links on console export (Closed)
Patch Set: up + test Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js
diff --git a/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js b/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js
index 2a2cb03bd15e6062cdea6878f92a303e2264fb94..1e85197ac10797e2d1849bcf059f405bbdfc8e7f 100644
--- a/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js
+++ b/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js
@@ -581,11 +581,14 @@ Node.prototype.appendChildren = function(var_args) {
};
/**
+ * @param {function(!Node):string=} transform
* @return {string}
*/
-Node.prototype.deepTextContent = function() {
+Node.prototype.deepTextContent = function(transform) {
dgozman 2016/12/19 18:38:01 Instead of adding transform here, let's copy this
luoe 2016/12/19 19:44:39 Done.
return this.childTextNodes()
.map(function(node) {
+ if (typeof transform === 'function')
+ return transform(node);
return node.textContent;
})
.join('');

Powered by Google App Engine
This is Rietveld 408576698