docs: function setState(element, state) {
    let elements = [].concat(element);
  
    if (!elements) return;
  
    let n = elements.length;
  
    for (let i = 0; i < n; i++) {
      let e = elements[i];
  
      if (getState(e) === state) continue;
  
      if (e.state !== undefined) {
        e.state = state;
      }
      else {
        e.setAttribute(Directive.STATE, state);
      }
    }
  }