Update casperjs to 1.0.2.

(imported from commit 9e34b51c4588dce6419ea86024b2e8c06346a685)
This commit is contained in:
Tim Abbott
2013-03-05 11:10:02 -05:00
parent d1fb74e627
commit eadb2ea6d3
116 changed files with 2757 additions and 745 deletions

View File

@@ -19,6 +19,8 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
/*global CasperError*/
var isArray = Array.isArray;
function EventEmitter() {
@@ -230,6 +232,17 @@ EventEmitter.prototype.filter = function() {
return filter.apply(this, Array.prototype.splice.call(arguments, 1));
};
EventEmitter.prototype.removeAllFilters = function(type) {
if (arguments.length === 0) {
this._filters = {};
return this;
}
if (type && this._filters && this._filters[type]) {
this._filters[type] = null;
}
return this;
};
EventEmitter.prototype.setFilter = function(type, filterFn) {
if (!this._filters) {
this._filters = {};