Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Applies DomDistillerJs to the content of the page and returns a | 5 // Applies DomDistillerJs to the content of the page and returns a |
| 6 // DomDistillerResults (as a javascript object/dict). | 6 // DomDistillerResults (as a javascript object/dict). |
| 7 (function(options, stringify_output) { | 7 (function(options, stringify_output) { |
| 8 try { | 8 try { |
| 9 function initialize() { | 9 function initialize() { |
| 10 // This include will be processed at build time by grit. | 10 // This include will be processed at build time by grit. |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 | 26 |
| 27 if (stringify_output) { | 27 if (stringify_output) { |
| 28 return JSON.stringify(res); | 28 return JSON.stringify(res); |
| 29 } | 29 } |
| 30 return res; | 30 return res; |
| 31 } catch (e) { | 31 } catch (e) { |
| 32 window.console.error("Error during distillation: " + e); | 32 window.console.error("Error during distillation: " + e); |
| 33 if (e.stack != undefined) window.console.error(e.stack); | 33 if (e.stack != undefined) window.console.error(e.stack); |
| 34 } | 34 } |
| 35 return undefined; | 35 return undefined; |
| 36 })(options = $$OPTIONS, | 36 })($$OPTIONS, |
| 37 stringify_output = $$STRINGIFY) | 37 $$STRINGIFY) |
|
mdjones
2017/06/07 00:15:44
nit: do these still need to be on different lines?
wychen
2017/06/07 01:17:32
Done.
| |
| OLD | NEW |