Files
serenity/Tests/LibWeb/Text/input/form-method-attribute.html
samu698 31cc24feed LibWeb: Use correct IDL for HTTPFormElement's method attribute
Removed the custom getter and updated the idl so that the attribute
is Reflected and Enumerated.

(cherry picked from commit 68924827551fc3169c1b9b59c0d7e8bc999a390c)
2024-11-25 09:21:14 -05:00

24 lines
802 B
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>