src/aria/utils/Event.js
function (element, event, callback, filterFunction) {
                var removed = false;
                var parent = element.parentElement || element.parentNode; // Fx < 9 compat
                while (parent != null) {
                    if (!filterFunction || filterFunction(parent)) {
                        removed = this.removeListener(parent, event, callback) || removed;
                    }
                    parent = parent.parentElement || parent.parentNode; // Fx < 9 compat
                }
                return removed;
            }
function (element, event, callback, filterFunction) {
                var removed = false;
                var parent = element.parentElement || element.parentNode; // Fx < 9 compat
                while (parent != null) {
                    if (!filterFunction || filterFunction(parent)) {
                        removed = this.removeListener(parent, event, callback) || removed;
                    }
                    parent = parent.parentElement || parent.parentNode; // Fx < 9 compat
                }
                return removed;
            }
function ( element , event , callback , filterFunction ) { var removed = false ; var parent = element . parentElement || element . parentNode ; // Fx < 9 compat while ( parent != null ) { if ( ! filterFunction || filterFunction ( parent ) ) { removed = this . removeListener ( parent , event , callback ) || removed ; } parent = parent . parentElement || parent . parentNode ; // Fx < 9 compat } return removed ; }
Removes an event handler to every ancestor of the given element. Note that in general you should prefer
to use event delegation pattern for performance reasons. Use this method only for events that do not
bubble.
@param {HTMLElement} element an element reference to remove the listener from.
@param {String} event The type of event to remove
@param {aria.utils.Callback|Object} callback The method the event invokes, if callback is undefined, then
all event handlers for the type of event are removed.
@param {Function} filterFunction function used to select HTML elements to remove the listener from (it
selects all the elements if the function is not provided)
@return {Boolean} True if at least one listener was removed, false otherwise.
Removes an event handler to every ancestor of the given element . Note that in general you should prefer to use event delegation pattern for performance reasons . Use this method only for events that do not bubble .