tton id=invalid-outside-form type=invalid popovertarget=mypopover>invalid</button>
<button id=missing-outside-form popovertarget=mypopover>missing</button>

<script>
test((t) => {
  let formReset = false;
  function onReset(e) {
    e.preventDefault();
    formReset = true;
  }
  form.addEventListener('reset', onReset);
  t.add_cleanup(() => {
    mypopover.hidePopover();
    form.removeEventListener('reset', onReset);
  });
  document.getElementById('reset-in-form').click();
  assert_true(formReset, 'type=