//double clicking selects across wbr elements.
synthesizeMouse(wbrElement, 5, 5, { clickCount: 2 }); var selectedText = window.getSelection().toString();
console.log(selectedText);
is(selectedText,"abcdef", "Select across WBR elements with double click: OK");
//selecting first letter of wbr element and using shift + arrowRight selects across wbr elements.
synthesizeMouse(wbrElement, 1, 5, { type: "mousedown" });
synthesizeMouse(wbrElement, 2, 5, { type: "mousemove" });
synthesizeMouse(wbrElement, 2, 5, { type: "mouseup" });
synthesizeKey("KEY_ArrowRight", {shiftKey:true});
synthesizeKey("KEY_ArrowRight", {shiftKey:true});
synthesizeKey("KEY_ArrowRight", {shiftKey:true});
synthesizeKey("KEY_ArrowRight", {shiftKey:true}); var selectedText = window.getSelection().toString();
console.log(selectedText);
is(selectedText, "abcd", "Select across WBR elements using shift and right arrow: OK");
//selection using ctrl + shift + rightArrow selects across wbr elements
synthesizeMouse(wbrElement, 1, 5, { type: "mousedown" });
synthesizeMouse(wbrElement, 2, 5, { type: "mousemove" });
synthesizeMouse(wbrElement, 2, 5, { type: "mouseup" });
synthesizeKey("KEY_ArrowRight", combinators); var selectedText = window.getSelection().toString();
console.log(selectedText);
is(selectedText, "abcdef", "Select across WBR elements using shift + ctrl + right arrow: OK");
//selection using ctrl + shift + rightArrow selects across wbr and br elements
synthesizeMouse(wbrElement, 1, 5, { type: "mousedown" });
synthesizeMouse(wbrElement, 2, 5, { type: "mousemove" });
synthesizeMouse(wbrElement, 2, 5, { type: "mouseup" });
synthesizeKey("KEY_ArrowRight", combinators);
synthesizeKey("KEY_ArrowRight", combinators); var selectedText = window.getSelection().toString();
console.log(selectedText);
is(selectedText, "abcdef" + kLF + "ghijkl", "Select across WBR elements using shift + ctrl + right arrow: OK");
//double clicking on a paragraph selects across wbr elements var paragraphWbr = document.getElementById("paragraphWbr");
synthesizeMouse(paragraphWbr, 5, 5, { clickCount: 2 }); var selectedText = window.getSelection().toString();
console.log(selectedText);
is(selectedText,"abcdefghijklmnopqr", "Select across WBR elements in paragraph with double click: OK");
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.