(snapshot)
| 5883 | } |
| 5884 | |
| 5885 | function restoreSelection(snapshot) { |
| 5886 | if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt()) { |
| 5887 | return |
| 5888 | } |
| 5889 | snapshot.activeElt.focus() |
| 5890 | if (snapshot.anchorNode && contains(document.body, snapshot.anchorNode) && contains(document.body, snapshot.focusNode)) { |
| 5891 | var sel = window.getSelection(), |
| 5892 | range$$1 = document.createRange() |
| 5893 | range$$1.setEnd(snapshot.anchorNode, snapshot.anchorOffset) |
| 5894 | range$$1.collapse(false) |
| 5895 | sel.removeAllRanges() |
| 5896 | sel.addRange(range$$1) |
| 5897 | sel.extend(snapshot.focusNode, snapshot.focusOffset) |
| 5898 | } |
| 5899 | } |
| 5900 | |
| 5901 | // Does the actual updating of the line display. Bails out |
| 5902 | // (returning false) when there is nothing to be done and forced is |
no test coverage detected