ladybird/Tests/LibWeb/Text/input/form-method-attribute.html
2025-03-20 11:50:49 +01:00

24 lines
818 B
HTML

<!DOCTYPE html>
<script src="./include.js"></script>
<script>
test(() => {
const form = document.createElement('form');
const values = [
'', undefined, null,
'get', 'post', 'dialog',
'GeT', 'POST', 'DIAlog',
'foo', 'xpost', '5%'
];
println('form: unset');
println(`form.getAttribute('method') == '${form.getAttribute('method')}'`);
println(`form.method == '${form.method}'`);
for (value of values) {
form.setAttribute('method', value);
println('');
println(`form.setAttribute('method', '${value}')`);
println(`form.getAttribute('method') == '${form.getAttribute('method')}'`);
println(`form.method == '${form.method}'`);
}
});
</script>