I noticed there doesn't appear to be any mechanism in place for
removing an element's storage, so I added this method. This is
important to do when deleting an element.


Element.addMethods( {
  removeStorage: function(element) {
    if (!(element = $(element))) return;

    var uid;
    if (element === window) {
      uid = 0;
    } else {
      if (typeof element._prototypeUID === "undefined") return;
      uid = element._prototypeUID[0];
    }

    if( Element.Storage[uid] ) delete Element.Storage[uid];
  }
});



I should probably have it return the element for the sake of chaining.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to