/** Test for Bug 795418 **/
SimpleTest.waitForExplicitFinish();
SimpleTest.waitForFocus(function() { vardiv = document.getElementById("copySource"); var sel = window.getSelection();
sel.removeAllRanges();
// Select the text from the text node in div. var r = document.createRange();
r.setStart(div.firstChild, 0);
r.setEnd(div.firstChild, 9);
sel.addRange(r);
SimpleTest.waitForClipboard(
aData => {
// XXX Oddly, specifying `r.toString()` causes timeout in headless mode.
info(`copied text: "${aData}"`);
return true;
},
function setup() {
synthesizeKey("C", {accelKey: true});
},
function onSuccess() { var theEdit = document.getElementById("editable");
sel.collapse(theEdit.firstChild, 2);
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.