src/aria/html/Element.js
function () {
                var eventListeners = this._cfg.on, hasListeners = false, listArray;
                var delegateManager = ariaUtilsDelegate;
                var delegateFallbackEvents = [];

                for (var listener in eventListeners) {
                    if (eventListeners.hasOwnProperty(listener)) {
                        hasListeners = true;
                        if (!delegateManager.isDelegated(listener)) {
                            delegateFallbackEvents.push(listener);
                        }
                        listArray = eventListeners[listener];
                        if (!ariaUtilsType.isArray(listArray)) {
                            listArray = [listArray];
                        }
                        for (var i = 0, listCount = listArray.length; i < listCount; i++) {
                            listArray[i] = this.$normCallback.call(this._context._tpl, listArray[i]);
                        }
                        eventListeners[listener] = listArray;
                    }
                }

                if (hasListeners) {
                    this.__delegateId = delegateManager.add({
                        fn : this._delegate,
                        scope : this
                    });
                    this.__delegateFallbackEvents = delegateFallbackEvents;
                }
            }
function () {
                var eventListeners = this._cfg.on, hasListeners = false, listArray;
                var delegateManager = ariaUtilsDelegate;
                var delegateFallbackEvents = [];

                for (var listener in eventListeners) {
                    if (eventListeners.hasOwnProperty(listener)) {
                        hasListeners = true;
                        if (!delegateManager.isDelegated(listener)) {
                            delegateFallbackEvents.push(listener);
                        }
                        listArray = eventListeners[listener];
                        if (!ariaUtilsType.isArray(listArray)) {
                            listArray = [listArray];
                        }
                        for (var i = 0, listCount = listArray.length; i < listCount; i++) {
                            listArray[i] = this.$normCallback.call(this._context._tpl, listArray[i]);
                        }
                        eventListeners[listener] = listArray;
                    }
                }

                if (hasListeners) {
                    this.__delegateId = delegateManager.add({
                        fn : this._delegate,
                        scope : this
                    });
                    this.__delegateFallbackEvents = delegateFallbackEvents;
                }
            }
function ( ) { var eventListeners = this . _cfg . on , hasListeners = false , listArray ; var delegateManager = ariaUtilsDelegate ; var delegateFallbackEvents = [ ] ; for ( var listener in eventListeners ) { if ( eventListeners . hasOwnProperty ( listener ) ) { hasListeners = true ; if ( ! delegateManager . isDelegated ( listener ) ) { delegateFallbackEvents . push ( listener ) ; } listArray = eventListeners [ listener ] ; if ( ! ariaUtilsType . isArray ( listArray ) ) { listArray = [ listArray ] ; } for ( var i = 0 , listCount = listArray . length ; i < listCount ; i ++ ) { listArray [ i ] = this . $normCallback . call ( this . _context . _tpl , listArray [ i ] ) ; } eventListeners [ listener ] = listArray ; } } if ( hasListeners ) { this . __delegateId = delegateManager . add ( { fn : this . _delegate , scope : this } ) ; this . __delegateFallbackEvents = delegateFallbackEvents ; } }
Since event's callbacks can be have several signatures as specified in
aria.widgetLibs.CommonBeans.Callback this function normalizes the callbacks for later use. It'll also ask
Delegate to generate a delegateId if needed.
@protected
Since event s callbacks can be have several signatures as specified in aria . widgetLibs . CommonBeans . Callback this function normalizes the callbacks for later use . It ll also ask Delegate to generate a delegateId if needed .