1 function selectRangeAfterLayoutAndPaint(startElement
, startIndex
, endElement
, endIndex
) {
2 runAfterLayoutAndPaint(function() {
3 selectRange(startElement
, startIndex
, endElement
, endIndex
);
7 function selectRange(startElement
, startIndex
, endElement
, endIndex
) {
9 window
.internals
.setSelectionPaintingWithoutSelectionGapsEnabled(true);
10 var range
= document
.createRange();
11 range
.setStart(startElement
, startIndex
);
12 range
.setEnd(endElement
, endIndex
);
13 window
.getSelection().addRange(range
);