mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
24 lines
807 B
HTML
24 lines
807 B
HTML
<script src="./include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
let testCounter = 1;
|
|
function testPart(part) {
|
|
println(`${testCounter++}. ${JSON.stringify(part())}`);
|
|
}
|
|
|
|
// 1. Get fieldset elements length
|
|
testPart(() => {
|
|
const fieldset = document.createElement('fieldset');
|
|
fieldset.innerHTML = `<input><input><button></button>`;
|
|
return fieldset.elements.length;
|
|
});
|
|
|
|
// 2. Get fieldset elements set stuff
|
|
testPart(() => {
|
|
const fieldset = document.createElement('fieldset');
|
|
fieldset.innerHTML = `<input><input value="FAIL"><button></button>`;
|
|
fieldset.elements[0].value = 'PASS';
|
|
return fieldset.children[0].value;
|
|
});
|
|
});
|
|
</script>
|