off(...)
off(evt : string, func : (...params : any[]) => void) : this;
Removes a handler function from an event.
Parameters
Parameter | Type | Description |
---|---|---|
evt | string | The name of the event with the attached function. |
func | function | The function to be removed. |
Returns
this
Example
myobject.on("pointerdown", myHandler);
myobject.off("pointerdown", myHandler);
function myHandler() {
// This function is not called
}