I agree with Jim,

If I remove an element from the DOM for whatever reason, perhaps its a
control widget that only gets inserted for inline editing or
something.  I don't want to re-apply listeners and proprietary data
each time I reinsert the control back into the document.

And this leads to another point that was made in another discussion
about "deep cloning",  So lets say we implement the functionality to
Element.remove and when you invoke this, it takes all the steps to
properly dispose of that element, fantastic, but what about child
elements, does it also walk through all children/grand children to
detect and remove storage data for these as well?

--

http://positionabsolute.net




On Sep 9, 3:44 pm, david <david.brill...@gmail.com> wrote:
> Hi Jim,
>
> I could have both opinion:
> - As it is attach on an element what is the interrest of having data
> staying inline and element disapear ?
> - But as you say, if you want to keep data when the element is removed
> from the DOM, because we know that it will be recreate.
>
> When reading the prototype blog post {1], one purpose of this class is
> used to avoid memory leak in IE, which seems to go in the direction of
> removing data.
> In the post, there is a link to $.fn.data and there, nothing is said
> in API documentation of this function.
>
> I think that this type of question is for should ask to our team 
> athttp://groups.google.fr/group/prototype-core
>
> [1]http://prototypejs.org/2009/2/16/pimp-my-code-1-element-storage
>
> --
> david
>
> On 9 sep, 16:26, Jim Higson <j...@wikizzle.org> wrote:
>
> > On Tuesday 08 September 2009 12:09:38 david wrote:
>
> > > Hi Yaffle,
>
> > > There is nothing in the code that seems to automatically delete the
> > > Storage object when an element is deleted.
> > > Even in the Element .remove,
>
> > But removing an element doesn't mean I'll never use it again. I might remove
> > it from the document and add it in somewhere else and I wouldn't want the 
> > data
> > associated with it to have gone in the meantime.
>
> > --
> > Jim
> > my wiki ajaxification thing:http://wikizzle.org
> > my blog:http://jimhigson.blogspot.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 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to