Chromium Code Reviews| Index: chrome/browser/resources/print_preview/component.js |
| diff --git a/chrome/browser/resources/print_preview/component.js b/chrome/browser/resources/print_preview/component.js |
| index f51c3ae1313f679019cd1a26c52bbf98773a575c..f18864bb59b13c6a5fff5d1d021369078bd452db 100644 |
| --- a/chrome/browser/resources/print_preview/component.js |
| +++ b/chrome/browser/resources/print_preview/component.js |
| @@ -73,20 +73,20 @@ cr.define('print_preview', function() { |
| */ |
| enterDocument: function() { |
| this.isInDocument_ = true; |
| - for (var child, i = 0; child = this.children_[i]; i++) { |
| + this.children_.forEach(function(child) { |
| if (!child.isInDocument && child.getElement()) { |
|
Dan Beam
2012/05/29 23:36:10
general optional nit: no curlies in all one line i
Robert Toscano
2012/05/30 21:08:00
I'd rather keep as is since lack of curlies can be
Dan Beam
2012/05/31 00:17:58
I agree, just telling you what the majority does.
|
| child.enterDocument(); |
| } |
| - } |
| + }); |
| }, |
| /** Removes all event listeners. */ |
| exitDocument: function() { |
| - for (var child, i = 0; child = this.children_[i]; i++) { |
| + this.children_.forEach(function(child) { |
| if (child.isInDocument) { |
| child.exitDocument(); |
| } |
| - } |
| + }); |
| this.tracker_.removeAll(); |
| this.isInDocument_ = false; |
| }, |