Ok, so You have to do it manually but only once in behavior definition...
Thanks, On Jun 16, 5:23 pm, Aaron Newton <[email protected]> wrote: > http://dev.clientcide.com/docs/behavior/Docs/Behavior.md#Behavior:cle... > > Whenever you retire an element from the DOM you call > myBehaviorInstance.cleanup(target). > > When you define a filter, you can define a method that is invoked when an > element is retired: > > Behavior.addGlobalFilter('Foo', function(element, api){ > var foo = new Foo(element); > api.onCleanup(function(){ > foo.destroy(); > }); > > > > > > > > }); > On Thu, Jun 16, 2011 at 2:23 AM, Robert <[email protected]> wrote: > > Btw., Aaron, does behaviors solve problems like this: > > >http://groups.google.com/group/mootools-users/browse_frm/thread/6c63c... > > I mean is there automatic object disposal when You destroy its > > element? > > You seam to said so here but I am not sure: > > "If you change the DOM, you might break the JS that sets it up and you > > always have to keep it in sync. You almost can’t do that here because > > the DOM and it’s configuration is closely bound and in the same > > place." > > > Thanks, > > > On Jun 15, 9:51 am, Aaron Newton <[email protected]> wrote: > > > For those who may not have seen this: > > > >http://www.clientcide.com/code-releases/clientcide-3-0-behavior-1-0-m...
