src/aria/templates/MarkupWriter.js
function (eventName, callback) {

                // do nothing if no section is defined (partial refresh usecase)
                if (!this._currentSection) {
                    return;
                }

                var delegate = ariaUtilsDelegate;

                // Fallback mechanism for event that can not be delegated
                if (!delegate.isDelegated(eventName)) {
                    var delegateId = delegate.add(callback);
                    this._currentSection.delegateIds.push(delegateId);
                    this.write(delegate.getFallbackMarkup(eventName, delegateId, true));
                    return;
                }

                // transform callback description into a new callback that will be use by the function doing dispatch
                callback = new aria.utils.Callback(callback);
                this._currentSection.delegateCallbacks.push(callback);

                if (!this._delegateMap) {
                    this._delegateMap = {};
                }

                this._delegateMap[eventName] = callback;

            }
function (eventName, callback) {

                // do nothing if no section is defined (partial refresh usecase)
                if (!this._currentSection) {
                    return;
                }

                var delegate = ariaUtilsDelegate;

                // Fallback mechanism for event that can not be delegated
                if (!delegate.isDelegated(eventName)) {
                    var delegateId = delegate.add(callback);
                    this._currentSection.delegateIds.push(delegateId);
                    this.write(delegate.getFallbackMarkup(eventName, delegateId, true));
                    return;
                }

                // transform callback description into a new callback that will be use by the function doing dispatch
                callback = new aria.utils.Callback(callback);
                this._currentSection.delegateCallbacks.push(callback);

                if (!this._delegateMap) {
                    this._delegateMap = {};
                }

                this._delegateMap[eventName] = callback;

            }
function ( eventName , callback ) { // do nothing if no section is defined (partial refresh usecase) if ( ! this . _currentSection ) { return ; } var delegate = ariaUtilsDelegate ; // Fallback mechanism for event that can not be delegated if ( ! delegate . isDelegated ( eventName ) ) { var delegateId = delegate . add ( callback ) ; this . _currentSection . delegateIds . push ( delegateId ) ; this . write ( delegate . getFallbackMarkup ( eventName , delegateId , true ) ) ; return ; } // transform callback description into a new callback that will be use by the function doing dispatch callback = new aria . utils . Callback ( callback ) ; this . _currentSection . delegateCallbacks . push ( callback ) ; if ( ! this . _delegateMap ) { this . _delegateMap = { } ; } this . _delegateMap [ eventName ] = callback ; }
Add a delegate function on current markup
@param {String} eventName
@param {aria.core.CfgBeans:Callback} callback
Add a delegate function on current markup