/**
* Test 'ex' and 'ch' units in every place we possible can to make
* sure they don't cause an infinite loop.
*/
var content = document.getElementById("content"); var cs = getComputedStyle(content, "");
for (var prop in gCSSProperties) { var info = gCSSProperties[prop];
function test_val(v) {
content.style.setProperty(prop, v, "");
isnot(get_computed_value(cs, prop), "", "Setting '" + prop + "' to '" + v + "' should not cause infinite loop");
}
test_val('3ex');
test_val('2ch');
function test_replaced_values(value_list) {
// For each item in value_list, if it looks like it has a dimension
// in it, replace those dimensions with 3ex and 2ch and test it.
for (var i = 0; i < value_list.length; ++i) { var value = value_list[i];
function try_replace(withval) { var rep = value.replace(/[0-9.]+[a-zA-Z]+/g, withval)
if (rep != value) {
test_val(rep);
}
}
try_replace('3ex');
try_replace('2ch');
}
}
test_replaced_values(info.initial_values);
test_replaced_values(info.other_values);
content.style.removeProperty(prop);
}
</script>
</pre>
</body>
</html>
Messung V0.5
¤ Dauer der Verarbeitung: 0.12 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.