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

Unified Diff: chrome/browser/resources/print_preview/component.js

Issue 10450022: Print Preview Print Destination Search Widget (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Set --bary flag Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
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()) {
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;
},

Powered by Google App Engine
This is Rietveld 408576698