Chromium Code Reviews| 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(''); |