//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// TypeScript helpers (universal micro-lib.) | Author: Sergei Y.Kitaev
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Helpers for interaction with HTML document tree (static class):
class HDoc {
    static Body() {
        return document.body;
    }
    static ClearSelection() {
        var sel = window.getSelection ? window.getSelection() : DOC.selection;
        if (!sel)
            return false;
        if (sel.removeAllRanges) {
            sel.removeAllRanges();
            return true;
        }
        else if (sel.empty) {
            sel.empty();
            return true;
        }
        return false;
    }
    static FocusedElement() {
        let activeElement = document.activeElement;
        return activeElement instanceof HTMLElement ? activeElement : null;
    }
} // HDoc
//# sourceMappingURL=HDoc.js.map