var s = document.getElementById("s"); var inner = document.getElementById("inner"); var rects = s.getClientRects();
is(s.getBoundingClientRect().top, inner.getBoundingClientRect().top, "'"+s.id+"' "+"IB-split span should start where its first line starts");
is(s.getClientRects().length, 3, "'"+s.id+"' "+"IB-split span should have three CSS boxes");
ok(rects[0].left < rects[0].right && rects[0].top < rects[0].bottom, "'"+s.id+"' "+"IB-split span should have a non-zero width first rect");
ok(rects[1].left < rects[1].right && rects[1].top < rects[1].bottom, "'"+s.id+"' "+"IB-split span should have a non-zero width second rect");
ok(rects[2].left < rects[2].right && rects[2].top < rects[2].bottom, "'"+s.id+"' "+"IB-split span should have a non-zero width second rect");
is(s.getBoundingClientRect().top, rects[0].top, "'"+s.id+"' "+"IB-split span should start where its first rect starts");
is(s.getBoundingClientRect().bottom, rects[2].bottom, "'"+s.id+"' "+"IB-split span should end where its last rect ends");
s = document.getElementById("s2");
inner = document.getElementById("inner2");
rects = s.getClientRects();
is(s.getBoundingClientRect().bottom, inner.getBoundingClientRect().bottom, "'"+s.id+"' "+"IB-split span should end where its last line ends");
is(s.getClientRects().length, 3, "'"+s.id+"' "+"IB-split span should have three CSS boxes");
is(s.getBoundingClientRect().bottom, rects[2].bottom, "'"+s.id+"' "+"IB-split span should end where its last rect ends");
s = document.getElementById("s3");
inner = document.getElementById("inner3"); var block = document.getElementById("inner3block");
rects = s.getClientRects();
is(s.getBoundingClientRect().top, block.getBoundingClientRect().top, "'"+s.id+"' "+"IB-split span should start where its first line starts");
is(s.getBoundingClientRect().bottom, inner.getBoundingClientRect().bottom, "'"+s.id+"' "+"IB-split span should end where its last line ends");
is(s.getClientRects().length, 3, "'"+s.id+"' "+"IB-split span should have three CSS boxes");
is(rects[0].left, rects[0].right, "'"+s.id+"' "+"IB-split span should have a zero width first rect");
is(s.getBoundingClientRect().top, rects[1].top, "'"+s.id+"' "+"IB-split span should start where its second rect starts");
s = document.getElementById("s4");
block = document.getElementById("inner4block");
rects = s.getClientRects();
is(s.getBoundingClientRect().top, block.getBoundingClientRect().top, "'"+s.id+"' "+"IB-split span should start where its first line starts");
is(s.getBoundingClientRect().bottom, block.getBoundingClientRect().bottom, "'"+s.id+"' "+"IB-split span should end where its last line ends");
is(s.getClientRects().length, 3, "'"+s.id+"' "+"IB-split span should have three CSS boxes");
is(rects[0].left, rects[0].right, "'"+s.id+"' "+"IB-split span should have a zero width first rect");
is(s.getBoundingClientRect().bottom, rects[1].bottom, "'"+s.id+"' "+"IB-split span should end where its block rect ends");
/*
ok(rects[2].left == rects[2].right, "'"+s.id+"' "+"IB-split span should have a zero width last rect");
*/
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.