Commit dd5c9fda dd5c9fdaeb0e3d86270a8e85afb6db833d904fa7 by Nicolas Perriault

hunting unnecessary selves (!)

1 parent 5b02d6c6
1 Subproject commit 100ffeb02edee0d765efd29ef897c25343e24b2d 1 Subproject commit 80a376076317c87d865e839252bb25f8af9ca77d
......
...@@ -376,11 +376,9 @@ Casper.prototype.each = function each(array, fn) { ...@@ -376,11 +376,9 @@ Casper.prototype.each = function each(array, fn) {
376 this.log("each() only works with arrays", "error"); 376 this.log("each() only works with arrays", "error");
377 return this; 377 return this;
378 } 378 }
379 (function _each(self) { 379 array.forEach.call(this, function _forEach(item, i) {
380 array.forEach(function _forEach(item, i) { 380 fn.call(this, this, item, i);
381 fn.call(self, self, item, i); 381 });
382 });
383 })(this);
384 return this; 382 return this;
385 }; 383 };
386 384
...@@ -922,8 +920,8 @@ Casper.prototype.start = function start(location, then) { ...@@ -922,8 +920,8 @@ Casper.prototype.start = function start(location, then) {
922 }, this.options.timeout, this); 920 }, this.options.timeout, this);
923 } 921 }
924 if (utils.isString(location) && location.length > 0) { 922 if (utils.isString(location) && location.length > 0) {
925 return this.thenOpen(location, utils.isFunction(then) ? then : this.createStep(function _step(self) { 923 return this.thenOpen(location, utils.isFunction(then) ? then : this.createStep(function _step() {
926 self.log("start page is loaded", "debug"); 924 this.log("start page is loaded", "debug");
927 })); 925 }));
928 } 926 }
929 return this; 927 return this;
......