];

  input.addEventListener("change", () => {
    events.push("change");
  });
  input.addEventListener("click", e => {
    // cancel click event
    e.preventDefault();
    events.push("click");
  });
  input.addEventListener("input", () => {
    events.push("input");
  });

  assert_false(input.checked);

  input.click();

  assert_false(input.checked);

  // only click event called
  assert_array_equals(events, ["click"]);

}, "radio input cancel behavior reverts state");
</script>
