add_task(async function captureLimit() {
// Capture no more than 100 fields per submit. See FormHistoryChild.sys.mjs.
const inputsCount = 100 + 2;
const form = document.getElementById("form1");
for (let i = 1; i <= inputsCount; i++) {
const newField = document.createElement("input");
newField.setAttribute("type", "text");
newField.setAttribute("name", "test" + i); form.appendChild(newField);
if( i != 50) {
SpecialPowers.wrap(newField).setUserInput(i);
}
}
for (let i = 1; i <= inputsCount; i++) { // check all but last
const historyEntries = await countEntries("test" + i, i);
switch(i) {
case 50:
is(historyEntries, 0, `no history saved for input ${i} because user didn't modify it`);
break;
case 102:
is(historyEntries, 0, `no history saved for input ${i} because form already captured 100 fields`);
break;
default:
is(historyEntries, 1, `history saved for input ${i}`);
break;
}
}
});
</script>
</body>
</html>
Messung V0.5
¤ Dauer der Verarbeitung: 0.15 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.