X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775:/src/core/core/Element.insertion.js diff --git a/src/core/core/Element.insertion.js b/src/core/core/Element.insertion.js index 07757d87..99683c91 100644 --- a/src/core/core/Element.insertion.js +++ b/src/core/core/Element.insertion.js @@ -1,5 +1,5 @@ /*! - * Ext JS Library 3.0.0 + * Ext JS Library 3.0.3 * Copyright(c) 2006-2009 Ext JS, LLC * licensing@extjs.com * http://www.extjs.com/license @@ -11,10 +11,7 @@ Ext.Element.addMethods( function() { var GETDOM = Ext.getDom, GET = Ext.get, - DH = Ext.DomHelper, - isEl = function(el){ - return (el.nodeType || el.dom || typeof el == 'string'); - }; + DH = Ext.DomHelper; return { /** @@ -63,14 +60,14 @@ function() { */ insertFirst: function(el, returnDom){ el = el || {}; - if(isEl(el)){ // element + if(el.nodeType || el.dom || typeof el == 'string'){ // element el = GETDOM(el); this.dom.insertBefore(el, this.dom.firstChild); return !returnDom ? GET(el) : el; }else{ // dh config return this.createChild(el, this.dom.firstChild, returnDom); } - }, + }, /** * Replaces the passed element with this element @@ -92,7 +89,7 @@ function() { replaceWith: function(el){ var me = this, Element = Ext.Element; - if(isEl(el)){ + if(el.nodeType || el.dom || typeof el == 'string'){ el = GETDOM(el); me.dom.parentNode.insertBefore(el, me.dom); }else{