mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 01:16:19 +00:00
Update casperjs to 1.0.2.
(imported from commit 9e34b51c4588dce6419ea86024b2e8c06346a685)
This commit is contained in:
@@ -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 = {};
|
||||
|
||||
Reference in New Issue
Block a user