mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 20:17:13 +02:00
LibWeb: Fixed IDL for HTMLButtonElement
Use Enumerated for the form{Enctype, Method} attributes
This commit is contained in:
Notes:
github-actions[bot]
2024-10-21 21:42:05 +00:00
Author: https://github.com/samu698 Commit: https://github.com/LadybirdBrowser/ladybird/commit/ab04f6d422a Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1884 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/BodilessSleeper Reviewed-by: https://github.com/stelar7 Reviewed-by: https://github.com/tcl3
23
Tests/LibWeb/Text/input/form-formMethod-attribute.html
Normal file
23
Tests/LibWeb/Text/input/form-formMethod-attribute.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<script src="./include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
const btn = document.createElement('button');
|
||||
const values = [
|
||||
'', undefined, null,
|
||||
'get', 'post', 'dialog',
|
||||
'GeT', 'POST', 'DIAlog',
|
||||
'foo', 'xpost', '5%'
|
||||
];
|
||||
|
||||
println('button: unset');
|
||||
println(`button.getAttribute('formMethod') == '${btn.getAttribute('formMethod')}'`);
|
||||
println(`button.formMethod == '${btn.formMethod}'`);
|
||||
for (value of values) {
|
||||
btn.setAttribute('formMethod', value);
|
||||
println('');
|
||||
println(`button.setAttribute('formMethod', '${value}')`);
|
||||
println(`button.getAttribute('formMethod') == '${btn.getAttribute('formMethod')}'`);
|
||||
println(`button.formMethod == '${btn.formMethod}'`);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user