LibWeb: Fixed IDL for HTMLButtonElement

Use Enumerated for the form{Enctype, Method} attributes
This commit is contained in:
samu698
2024-10-20 18:26:45 +02:00
committed by Andrew Kaster
parent 6892482755
commit ab04f6d422
Notes: github-actions[bot] 2024-10-21 21:42:05 +00:00
6 changed files with 170 additions and 2 deletions

View 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>