mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-13 22:52:52 +00:00
36 lines
1.4 KiB
HTML
36 lines
1.4 KiB
HTML
<script src="./include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
const btn = document.createElement('button');
|
|
const input = document.createElement('input');
|
|
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}'`);
|
|
}
|
|
|
|
println('');
|
|
println('input: unset')
|
|
println(`input.getAttribute('formMethod') == '${input.getAttribute('formMethod')}'`);
|
|
println(`input.formMethod == '${input.formMethod}'`);
|
|
for (value of values) {
|
|
input.setAttribute('formMethod', value);
|
|
println('');
|
|
println(`input.setAttribute('formMethod', '${value}')`);
|
|
println(`input.getAttribute('formMethod') == '${input.getAttribute('formMethod')}'`);
|
|
println(`input.formMethod == '${input.formMethod}'`);
|
|
}
|
|
});
|
|
</script>
|