MCPcopy Index your code
hub / github.com/prototypejs/prototype / getStorage

Function getStorage

src/prototype/dom/dom.js:3117–3126  ·  view source on GitHub ↗

* Element.getStorage(@element) -> Hash * * Returns the [[Hash]] object that stores custom metadata for this element.

(element)

Source from the content-addressed store, hash-verified

3115 * Returns the [[Hash]] object that stores custom metadata for this element.
3116 **/
3117 function getStorage(element) {
3118 if (!(element = $(element))) return;
3119
3120 var uid = getUniqueElementID(element);
3121
3122 if (!Element.Storage[uid])
3123 Element.Storage[uid] = $H();
3124
3125 return Element.Storage[uid];
3126 }
3127
3128 /**
3129 * Element.store(@element, key, value) -> Element

Callers 2

storeFunction · 0.85
retrieveFunction · 0.85

Calls 3

$Function · 0.85
$HFunction · 0.85
getUniqueElementIDFunction · 0.70

Tested by

no test coverage detected