Files
ladybird/Tests/LibWeb/Text/input/form-formMethod-attribute.html
samu698 ab04f6d422 LibWeb: Fixed IDL for HTMLButtonElement
Use Enumerated for the form{Enctype, Method} attributes
2024-10-21 15:41:00 -06:00

24 lines
850 B
HTML

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