<!DOCTYPE html>
<div>foo bar baz</div>
<script src="include.js"></script>
<script>
test(() => {
    function reportSelection() {
        const range = getSelection().getRangeAt(0);
        println(`${range.startContainer.nodeName} ${range.startOffset} - ${range.endContainer.nodeName} ${range.endOffset}`);
    }

    const divElm = document.querySelector('div');
    getSelection().setBaseAndExtent(divElm.childNodes[0], 0, divElm.childNodes[0], 3);
    reportSelection();

    const modAlt = 1 << 0;
    const 