/**
* DO NOT EDIT THIS FILE.
* See the following change record for more information,
* https://www.drupal.org/node/2815083
* @preserve
**/

(Drupal => {
  Drupal.behaviors.focusFirstTest = {
    attach() {
      once('focusin', document.body).forEach(element => {
        element.addEventListener('focusin', e => {
          document.querySelectorAll('[data-has-focus]').forEach(wasFocused => {
            wasFocused.removeAttribute('data-has-focus');
          });
          e.target.setAttribute('data-has-focus', true);
        });
      });
    }

  };
})(Drupal, once);