src/dom/getState.js
function getState(element) {
  assertType(element, Node, false, 'Invalid element specified');

  let state = element.state || element.getAttribute(Directive.STATE);

  if (!state || state === '')
    return null;
  else
    return state;
}
function getState(element) {
  assertType(element, Node, false, 'Invalid element specified');

  let state = element.state || element.getAttribute(Directive.STATE);

  if (!state || state === '')
    return null;
  else
    return state;
}
function getState ( element ) { assertType ( element , Node , false , 'Invalid element specified' ) ; let state = element . state || element . getAttribute ( Directive . STATE ) ; if ( ! state || state === '' ) return null ; else return state ; }
Gets the current state of a DOM element as defined by Directive.STATE.

@param {Node} element - Target element.

@return {string} State of the target element.

@alias module:requiem~dom.getState
Gets the current state of a DOM element as defined by Directive . STATE .