function checkMozIsTextFieldDefined(aElement, aResult)
{ var element = document.createElement(aElement);
var msg = "mozIsTextField should be "
if (aResult) {
msg += "defined";
} else {
msg += "undefined";
}
is('mozIsTextField' in element, aResult, msg);
}
function checkMozIsTextFieldValue(aInput, aResult)
{
is(aInput.mozIsTextField(false), aResult, "mozIsTextField(false) should return " + aResult);
if (aInput.type == 'password') {
ok(!aInput.mozIsTextField(true), "mozIsTextField(true) should return false for password");
} else {
is(aInput.mozIsTextField(true), aResult, "mozIsTextField(true) should return " + aResult);
}
}
function checkMozIsTextFieldValueTodo(aInput, aResult)
{
todo_is(aInput.mozIsTextField(false), aResult, "mozIsTextField(false) should return " + aResult);
todo_is(aInput.mozIsTextField(true), aResult, "mozIsTextField(true) should return " + aResult);
}
// Check if the method is defined for the correct elements.
for (data of gElementTestData) {
checkMozIsTextFieldDefined(data[0], data[1]);
}
// Check if the method returns the correct value. varinput = document.createElement('input');
for (data of gInputTestData) { input.type = data[0];
checkMozIsTextFieldValue(input, data[1]);
}
</script>
</pre>
</body>
</html>
Messung V0.5
¤ Dauer der Verarbeitung: 0.26 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.