"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.webSelection = webSelection;
function webSelection(window, opt) {
    const containsSelection = (element) => {
        const selection = window.getSelection();
        if (selection) {
            const { anchorNode } = selection;
            return element.contains(anchorNode);
        }
    };
    const removeSelection = () => {
        const selection = window.getSelection();
        selection.removeAllRanges();
    };
    const selection = {
        containsSelection,
        removeSelection,
    };
    return selection;
}
//# sourceMappingURL=selection.js.map