static/ext/src/dom/Helper.js
function(el, html, returnElement) {
        var newNode;

        el = Ext.getDom(el);
        html = this.markup(html);

        // IE Inserting HTML into a table/tbody/tr requires extra processing: http://www.ericvasilik.com/2006/07/code-karma.html
        if (Ext.isIE && this.tableRe.test(el.tagName)) {
            // Clearing table elements requires removal of all elements.
            while (el.firstChild) {
                el.removeChild(el.firstChild);
            }
            if (html) {
                newNode = this.insertHtml('afterbegin', el, html);
                return returnElement ? Ext.get(newNode) : newNode;
            }
            return null;
        }
        el.innerHTML = html;
        return returnElement ? Ext.get(el.firstChild) : el.firstChild;
    }
function(el, html, returnElement) {
        var newNode;

        el = Ext.getDom(el);
        html = this.markup(html);

        // IE Inserting HTML into a table/tbody/tr requires extra processing: http://www.ericvasilik.com/2006/07/code-karma.html
        if (Ext.isIE && this.tableRe.test(el.tagName)) {
            // Clearing table elements requires removal of all elements.
            while (el.firstChild) {
                el.removeChild(el.firstChild);
            }
            if (html) {
                newNode = this.insertHtml('afterbegin', el, html);
                return returnElement ? Ext.get(newNode) : newNode;
            }
            return null;
        }
        el.innerHTML = html;
        return returnElement ? Ext.get(el.firstChild) : el.firstChild;
    }
function ( el , html , returnElement ) { var newNode ; el = Ext . getDom ( el ) ; html = this . markup ( html ) ; // IE Inserting HTML into a table/tbody/tr requires extra processing: http://www.ericvasilik.com/2006/07/code-karma.html if ( Ext . isIE && this . tableRe . test ( el . tagName ) ) { // Clearing table elements requires removal of all elements. while ( el . firstChild ) { el . removeChild ( el . firstChild ) ; } if ( html ) { newNode = this . insertHtml ( 'afterbegin' , el , html ) ; return returnElement ? Ext . get ( newNode ) : newNode ; } return null ; } el . innerHTML = html ; return returnElement ? Ext . get ( el . firstChild ) : el . firstChild ; }
Creates new DOM element(s) and overwrites the contents of el with them.
@param {String/HTMLElement/Ext.Element} el The context element
@param {Object/String} o The DOM object spec (and children) or raw HTML blob
@param {Boolean} [returnElement] true to return an Ext.Element
@return {HTMLElement/Ext.Element} The new node
Creates new DOM element ( s ) and overwrites the contents of el with them .