| 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;
|
| },
|
|
|