modules/pointerEvents.js
function (root) {
        var current = root.prototype ? root.prototype.removeEventListener : root.removeEventListener;

        var customRemoveEventListener = function (name, func, capture) {
            // Release when a PointerXXX is used
            if (supportedEventsNames.indexOf(name) !== -1) {
                setTouchAware(this, name, false);
            }

            if (current === undefined) {
                this.detachEvent(getMouseEquivalentEventName(name), func);
            } else {
                current.call(this, name, func, capture);
            }
        };
        if (root.prototype) {
            root.prototype.removeEventListener = customRemoveEventListener;
        } else {
            root.removeEventListener = customRemoveEventListener;
        }
    }
function (root) {
        var current = root.prototype ? root.prototype.removeEventListener : root.removeEventListener;

        var customRemoveEventListener = function (name, func, capture) {
            // Release when a PointerXXX is used
            if (supportedEventsNames.indexOf(name) !== -1) {
                setTouchAware(this, name, false);
            }

            if (current === undefined) {
                this.detachEvent(getMouseEquivalentEventName(name), func);
            } else {
                current.call(this, name, func, capture);
            }
        };
        if (root.prototype) {
            root.prototype.removeEventListener = customRemoveEventListener;
        } else {
            root.removeEventListener = customRemoveEventListener;
        }
    }
function ( root ) { var current = root . prototype ? root . prototype . removeEventListener : root . removeEventListener ; var customRemoveEventListener = function ( name , func , capture ) { // Release when a PointerXXX is used if ( supportedEventsNames . indexOf ( name ) !== - 1 ) { setTouchAware ( this , name , false ) ; } if ( current === undefined ) { this . detachEvent ( getMouseEquivalentEventName ( name ) , func ) ; } else { current . call ( this , name , func , capture ) ; } } ; if ( root . prototype ) { root . prototype . removeEventListener = customRemoveEventListener ; } else { root . removeEventListener = customRemoveEventListener ; } }
Intercept removeEventListener calls by changing the prototype
Intercept removeEventListener calls by changing the prototype