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

Function getUniqueElementID

src/prototype/dom/dom.js:3089–3097  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

3087 GLOBAL.Element.Storage = { UID: 1 };
3088
3089 function getUniqueElementID(element) {
3090 if (element === window) return 0;
3091
3092 // Need to use actual `typeof` operator to prevent errors in some
3093 // environments when accessing node expandos.
3094 if (typeof element._prototypeUID === 'undefined')
3095 element._prototypeUID = Element.Storage.UID++;
3096 return element._prototypeUID;
3097 }
3098
3099 // In Internet Explorer, DOM nodes have a `uniqueID` property. Saves us
3100 // from inventing our own.

Callers 5

purgeElementFunction · 0.70
purgeCollection_IEFunction · 0.70
getStorageFunction · 0.70
elementIsExtendedFunction · 0.70
extendFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected