Commit 330f8a7a 330f8a7a9ae9f8788e56ac52c04f95e072d23558 by Christopher Van Committed by Christopher Van

fix code sample in `__utils__.findAll` documentation

this code doesn't work; `Array.prototype.forEach` should be `Array.prototype.map`.
1 parent 091bbc34
......@@ -109,7 +109,7 @@ Retrieves all DOM elements matching a given :ref:`selector expression <selectors
casper.start('http://foo.bar/', function() {
links = this.evaluate(function() {
var elements = __utils__.findAll('a.menu');
return Array.prototype.forEach.call(elements, function(e) {
return elements.map(function(e) {
return e.getAttribute('href');
});
});
......