Hi Matt, I'am totally agree with you about the trouble when removing a DOM tree if we need to remove all storage. And when Updating a DOM tree, the problem is still the same. And if element is removed with javascript (ie non prototype method) ... The first thought when I last answers, what that it is practically impossible to code (or with Mutation Event ;)) bevcause it could happen in so many cases.
-- david On 9 sep, 21:59, Matt Foster <[email protected]> wrote: > 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 <[email protected]> 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 <[email protected]> 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
