Element.purge().... Yet another prototype 1.7 feature I was not aware
of :o)

Is there any way to export this online documentation into a convenient
PDF or anything I can print and turn into a book like the one for
prototype 1.6?


On Jun 16, 10:44 am, "T.J. Crowder" <t...@crowdersoftware.com> wrote:
> Hi,
> On Jun 16, 9:11 am, Acu <woj...@studioatrium.pl> wrote:
> > I am curious what happens with references to Events registered through
> > Event.Observe when object bound with those evenst is removed with
> > Element.remove function. Are they automatically freed (like with
> > Event.unloadCache)? Or maybe one should unregister those events with
> > Event.stopObserving before removing object?
> Prototype doesn't do anything to remove the handlers on `remove`,
> they'll stay in memory.
> If you know you've only set handlers on that element and none of its
> children, yes, use `stopObserving`:
>     $("theElement").stopObserving().remove();
> If there may be handlers on the element's children as well, use
> `purge`[1]:
>     $("theElement").purge().remove();
> It's not clear from the documentation, but `purge` does remove
> handlers from the element's descendants.
> [1]http://api.prototypejs.org/dom/Element/purge/
> HTH,
> --
> T.J. Crowder
> Independent Software Engineer
> tj / crowder software / com
> www / crowder software / com

You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to