dom-data.js

Methods

static getData(el) → {Object}

Returns the cache object where data for an element is stored

Parameters:
Name Type Description
el Element

Element to store data for.

Returns:
Object -

The cache object for that el that was passed in.

static hasData(el) → {boolean}

Returns whether or not an element has cached data

Parameters:
Name Type Description
el Element

Check if this element has cached data.

Returns:
boolean -
  • True if the DOM element has cached data.
      - False otherwise.

static removeData(el)

Delete data for the element from the cache and the guid attr from getElementById

Parameters:
Name Type Description
el Element

Remove cached data for this element.