mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-17 00:23:00 +00:00
27 lines
827 B
HTML
27 lines
827 B
HTML
<script src="./include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
let testCounter = 1;
|
|
function testPart(part) {
|
|
println(`${testCounter++}. ${JSON.stringify(part())}`);
|
|
}
|
|
|
|
// 1. Set output element value
|
|
testPart(() => {
|
|
const output = document.createElement('output');
|
|
output.value = 'PASS';
|
|
return output.textContent;
|
|
});
|
|
|
|
// 2. Set output element default value and reset
|
|
testPart(() => {
|
|
const form = document.createElement('form');
|
|
const output = document.createElement('output');
|
|
output.defaultValue = 'PASS';
|
|
output.value = 'FAIL';
|
|
form.appendChild(output);
|
|
form.reset();
|
|
return output.textContent;
|
|
});
|
|
});
|
|
</script>
|