I disagree; look at jquery.ui.js line 269-285
this.element = $(element)
.bind('setData.' + name, function(event, key, value) {
if (event.target == element) {
return self._setData(key, value);
}
})
.bind('getData.' + name, function(event, key) {
if (event.target == element) {
return self._getData(key);
}
})
.bind('remove', function() {
return self.destroy();
});
that last bind fires even after destroy unless I unbind it.
I totally agree that I am responsible for my own events, but these are
not my widgets responsibility.
On Dec 13, 12:44 pm, Scott González <
scott.gonza...@gmail.com> wrote:
> The widget factory doesn't unbind event handlers because it doesn't
> bind any. You are fully responsible for undoing anything you do.
> There's absolutely no way for the factory to know what you've done.
>
> Anything the factory does, it cleans up, which is why you have to call
> the base method.
>