removeEventListener
Unregister an event handler to be called when an event is dispatched.
obj.removeEventListener(eventName, [handler [,queueName]] )
Removes one or more handlers from being called when eventName
is dispatched.
// Removes `handler` if it is in the notify queue.
obj.removeEventListener("closed", handler, "notify")
// Removes `handler` if it is in the mutate queue.
obj.removeEventListener("closed", handler)
// Removes all "closed" handlers.
obj.removeEventListener("closed")
Parameters
- eventName
{String}
:The name of the event to remove. If not specified, all events are removed.
- handler
{function}
:The handler that will be removed from the event. If not specified, all handlers for the event are removed.
- queueName
{String}
:The name of the can-queues queue the handler was registered on. Defaults to
"mutate"
.
Returns
{Object}
:
Returns the object .removeEventListener
was called on.