<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: form submit event</title>
<link rel="help" href="https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-submission-algorithm">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<body>
<script>
"use strict";

let submitEvent;
function prepareForm() {
  submitEvent = undefined;
  const form = document.createElement("FORM");
  const submitButton = document.createElement("BUTTO