can
Version:
MIT-licensed, client-side, JavaScript framework that makes building rich web applications easy.
25 lines (20 loc) • 665 B
Markdown
Model.unbind unbind
can.Model.static
Stop listening for events on a Model class.
`can.Model.unbind(eventType, handler)`
{String} eventType The type of event. It must be
`"created"`, `"updated"`, `"destroyed"`.
{function} handler A callback function
that was passed to `bind`.
{can.Model} The model constructor function.
`unbind(eventType, handler)` removes a listener
attached with [can.Model.bind].
```
var handler = function(ev, createdTask){
}
Task.bind("created", handler)
Task.unbind("created", handler)
```
You have to pass the same function to `unbind` that you
passed to `bind`.
can.