var elements = [ 'input', 'textarea' ]; var content = document.getElementById('content');
function checkValid(elmt)
{
ok(!elmt.validity.tooLong, "element should not be too long");
is(window.getComputedStyle(elmt).getPropertyValue('background-color'), "rgb(0, 255, 0)", ":valid pseudo-class should apply");
}
function checkInvalid(elmt)
{
todo(elmt.validity.tooLong, "element should be too long");
todo_is(window.getComputedStyle(elmt).getPropertyValue('background-color'), "rgb(255, 0, 0)", ":invalid pseudo-class should apply");
}
for (var elmtName of elements) { var elmt = document.createElement(elmtName);
content.appendChild(elmt);
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.