mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:47:47 +00:00
LibWeb: Add support for form submission method 'dialog'
This commit is contained in:
parent
151cd11b5b
commit
0ecbdc4627
3 changed files with 41 additions and 7 deletions
22
Tests/LibWeb/Text/input/form-method-dialog.html
Normal file
22
Tests/LibWeb/Text/input/form-method-dialog.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
<style>
|
||||
#test-dialog {
|
||||
}
|
||||
</style>
|
||||
<script src="./include.js"></script>
|
||||
<dialog id="test-dialog" open>
|
||||
<form method="dialog">
|
||||
<button id="submit-button">Submit</button>
|
||||
</form>
|
||||
</dialog>
|
||||
<script>
|
||||
test(() => {
|
||||
const dialog = document.getElementById("test-dialog");
|
||||
const submitter = document.getElementById("submit-button");
|
||||
const submitterRect = submitter.getBoundingClientRect();
|
||||
const form = document.forms[0];
|
||||
println(`dialog.open before form submit: ${dialog.open}`);
|
||||
form.submit();
|
||||
println(`dialog.open after form submit: ${dialog.open}`);
|
||||
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue