Merge pull request #1418 from loudoweb/event
[feature] add removeAll feature for lime event
This commit is contained in:
@@ -155,4 +155,19 @@ class Event<T>
|
|||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Removes all event listeners
|
||||||
|
**/
|
||||||
|
public function removeAll():Void
|
||||||
|
{
|
||||||
|
#if !macro
|
||||||
|
var len = __listeners.length;
|
||||||
|
|
||||||
|
__listeners.splice(0, len);
|
||||||
|
__priorities.splice(0, len);
|
||||||
|
__repeat.splice(0, len);
|
||||||
|
|
||||||
|
#end
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user