Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/interactive-elements/the-dialog-element/dialog-requestclose-closedby.tentative.html - WPT Dashboard Interop Dashboard
<!doctype html>
<meta charset="utf-8">
<link rel=help href="https://html.spec.whatwg.org/multipage/interactive-elements.html#dom-dialog-request-close">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="author" href="mailto:lwarlow@igalia.com" />
<dialog id="dialog" closedby="any"></dialog>
<script>
test(() => {
dialog.show();
dialog.oncancel = () => {
dialog.removeAttribute('closedby');
}
dialog.requestClose();
assert_false(dialog.open);
}, "requestClose() should close the dialog even when computed closedby becomes none");
</script>