src/js/domevent.js
function unbindEvent(element, type, handler) {
    const events = safeEvent(element, type);
    const items = events.get(handler);

    if (!items) {
        return;
    }

    forgetHandler(element, type, handler);

    util.forEach(items, func => {
        if ('removeEventListener' in element) {
            element.removeEventListener(type, func);
        } else if ('detachEvent' in element) {
            element.detachEvent(`on${type}`, func);
        }
    });
}
function unbindEvent(element, type, handler) {
    const events = safeEvent(element, type);
    const items = events.get(handler);

    if (!items) {
        return;
    }

    forgetHandler(element, type, handler);

    util.forEach(items, func => {
        if ('removeEventListener' in element) {
            element.removeEventListener(type, func);
        } else if ('detachEvent' in element) {
            element.detachEvent(`on${type}`, func);
        }
    });
}
function unbindEvent ( element , type , handler ) { const events = safeEvent ( element , type ) ; const items = events . get ( handler ) ; if ( ! items ) { return ; } forgetHandler ( element , type , handler ) ; util . forEach ( items , func => { if ( 'removeEventListener' in element ) { element . removeEventListener ( type , func ) ; } else if ( 'detachEvent' in element ) { element . detachEvent ( ` ${ type } ` , func ) ; } } ) ; }
Unbind DOM events
@param {HTMLElement} element - element to unbind events
@param {string} type - events name
@param {function} handler - handler function or context for handler
method
Unbind DOM events