packages/mdl-drawer/util.js
/**
 * Restore the tab state for an element, if it was saved.
 * @param {Element} el The element for which to restore the tab state.
 */
Restore the tab state for an element, if it was saved.
@param {Element} el The element for which to restore the tab state.
Restore the tab state for an element if it was saved . @param { Element } el The element for which to restore the tab state .
function restoreElementTabState(el) {
  if (el.hasAttribute(TAB_DATA_HANDLED)) {
    if (el.hasAttribute(TAB_DATA)) {
      el.setAttribute('tabindex', el.getAttribute(TAB_DATA));
      el.removeAttribute(TAB_DATA);
    } else {
      el.removeAttribute('tabindex');
    }
    el.removeAttribute(TAB_DATA_HANDLED);
  }
}
function restoreElementTabState ( el ) { if ( el . hasAttribute ( TAB_DATA_HANDLED ) ) { if ( el . hasAttribute ( TAB_DATA ) ) { el . setAttribute ( 'tabindex' , el . getAttribute ( TAB_DATA ) ) ; el . removeAttribute ( TAB_DATA ) ; } else { el . removeAttribute ( 'tabindex' ) ; } el . removeAttribute ( TAB_DATA_HANDLED ) ; } }
Restore the tab state for an element, if it was saved.
Restore the tab state for an element if it was saved .
// Only modify elements we've already handled, in case anything was dynamically added since we saved state.