common.off

Removes event listener from the object.
off(type, [handler])
type string, name of the event
handler function, JavaScript function (optional)
OR
off(eventData, handler)
eventData object, parameters of the event
handler function, JavaScript function
Returns undefined.

Description

You can remove a specific listener for a specific event, all listener for a specific event, or all listener for all events. For example, if you have a layout (same for grid, toolbar, etc.) defined as follows: You can remove a specific event listener (note that the handler cannot be an anonymous function): All listeners for the event: All listeners for all events:

Event Namespace

While adding an event listener, you can provide a namespace for the event: It provides you with a convenience to remove events listener in an easy way without specifying all events and functions they were registered with:

User Comments

comments powered by Disqus