export default function Delegate(delegateNode, eventType, selector, listener) {
    delegateNode.addEventListener(
        eventType,
        function (event) {
            var match = event.target.closest(selector)
            if (match) {
                listener.call(match, event)
            }
        },
        true
    )
}
