src/aria/templates/MarkupWriter.js
function (m) {
                if (this._delegateMap) {
                    if (m || m === 0) {
                        // String cast
                        m = '' + m;
                        var closingIndex = m.indexOf(">");
                        if (closingIndex != -1) {
                            var delegateMap = this._delegateMap;
                            this._delegateMap = null;
                            // delegate function that will call the good callback for the good event
                            var handler = function (event) {
                                var eventWrapper = new ariaTemplatesDomEventWrapper(event), result = true;
                                var targetCallback = delegateMap[event.type];
                                if (targetCallback) {
                                    if (event.type == "safetap") {
                                        aria.touch.ClickBuster.registerTap(event);
                                    }
                                    result = targetCallback.call(eventWrapper);
                                }
                                eventWrapper.$dispose();
                                return result;
                            };
                            var delegateId = ariaUtilsDelegate.add(handler);
                            this._currentSection.delegateIds.push(delegateId);
                            this._out.push(m.substring(0, closingIndex));
                            this._out.push(" " + ariaUtilsDelegate.getMarkup(delegateId));
                            this._out.push(m.substring(closingIndex));

                            return;
                        }
                    }
                }
                this._out.push(m);

            }
function (m) {
                if (this._delegateMap) {
                    if (m || m === 0) {
                        // String cast
                        m = '' + m;
                        var closingIndex = m.indexOf(">");
                        if (closingIndex != -1) {
                            var delegateMap = this._delegateMap;
                            this._delegateMap = null;
                            // delegate function that will call the good callback for the good event
                            var handler = function (event) {
                                var eventWrapper = new ariaTemplatesDomEventWrapper(event), result = true;
                                var targetCallback = delegateMap[event.type];
                                if (targetCallback) {
                                    if (event.type == "safetap") {
                                        aria.touch.ClickBuster.registerTap(event);
                                    }
                                    result = targetCallback.call(eventWrapper);
                                }
                                eventWrapper.$dispose();
                                return result;
                            };
                            var delegateId = ariaUtilsDelegate.add(handler);
                            this._currentSection.delegateIds.push(delegateId);
                            this._out.push(m.substring(0, closingIndex));
                            this._out.push(" " + ariaUtilsDelegate.getMarkup(delegateId));
                            this._out.push(m.substring(closingIndex));

                            return;
                        }
                    }
                }
                this._out.push(m);

            }
function ( m ) { if ( this . _delegateMap ) { if ( m || m === 0 ) { // String cast m = '' + m ; var closingIndex = m . indexOf ( ">" ) ; if ( closingIndex != - 1 ) { var delegateMap = this . _delegateMap ; this . _delegateMap = null ; // delegate function that will call the good callback for the good event var handler = function ( event ) { var eventWrapper = new ariaTemplatesDomEventWrapper ( event ) , result = true ; var targetCallback = delegateMap [ event . type ] ; if ( targetCallback ) { if ( event . type == "safetap" ) { aria . touch . ClickBuster . registerTap ( event ) ; } result = targetCallback . call ( eventWrapper ) ; } eventWrapper . $dispose ( ) ; return result ; } ; var delegateId = ariaUtilsDelegate . add ( handler ) ; this . _currentSection . delegateIds . push ( delegateId ) ; this . _out . push ( m . substring ( 0 , closingIndex ) ) ; this . _out . push ( " " + ariaUtilsDelegate . getMarkup ( delegateId ) ) ; this . _out . push ( m . substring ( closingIndex ) ) ; return ; } } } this . _out . push ( m ) ; }
Put markup in current output stream
@param {String} m the HTML markup to write in the current output
Put markup in current output stream