Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/interactive-elements/the-dialog-element/dialog-form-submission-unusual.html - WPT Dashboard Interop Dashboard
<!doctype html>
<title>Test dialog form submission, unusual cases</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<dialog>
<input type=submit id=submit-2>
</form>
</dialog>
<script>
test(() => {
const dialog = document.querySelector("dialog");
dialog.showModal();
assert_true(dialog.open);
document.getElementById("submit-1").click();
assert_false(dialog.open);
}, "A form's action and rel=noopener are ignored during submission");
test(() => {
const dialog = document.querySelector("dialog");
dialog.showModal();
assert_true(dialog.open);
document.getElementById("submit-2").click();
assert_false(dialog.open);
}, "A form's action and rel=noopener are ignored during submission, part 2");
</script>