#164 new
david karapetyan

Element.store semantics

Reported by david karapetyan | May 21st, 2010 @ 09:15 AM

The documentation for Element.store should make it clear how the data is stored so people can avoid memory management issues. When I looked at the code it appears that Element.store puts everything in some global object that is unrelated to the actual element so when the object is removed from the DOM tree its stored data still remains. This can be a problem for applications that create and destroy a lot of elements and store metadata on each element.

Comments and changes to this ticket

  • KKI

    KKI July 26th, 2010 @ 03:23 AM

    • Assigned user set to “Samuel Lebeau”


    Maybe, the element could store the metada ?

      getStorage: function(element) {
        if (!(element = $(element))) return;
        if (typeof element._prototypeStorage === "undifened")
          element._prototypeStorage = $H();
        return element._prototypeStorage;
  • KKI

    KKI July 26th, 2010 @ 03:24 AM

    • Assigned user cleared.
  • david karapetyan

    david karapetyan July 26th, 2010 @ 05:37 AM

    I am not an expert on how the DOM works so I'm not sure how garbage management would work with storing the data along with the element but your idea sounds good.

  • Himanshu mishra

    Himanshu mishra May 23rd, 2019 @ 09:54 AM

    • Assigned user set to “Samuel Lebeau”

    Many many thanks for such knowledgeable article, If you were getting trouble with slow browser speed then from here http://deletebinghistory.com learn to delete bing search history in windows 10 pc in easiest way.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins