X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Roo.js;h=7df38d2beca584b7cea6199e2ea04ea7c11356fe;hb=refs%2Fheads%2Fgithub.com.roojs1.master;hp=bf4016a47208500539cb5b07771fdaf45f5d7a49;hpb=aba777250c9cac034099b8664620f9d25366492b;p=roojs1 diff --git a/Roo.js b/Roo.js index bf4016a472..7df38d2bec 100644 --- a/Roo.js +++ b/Roo.js @@ -319,7 +319,7 @@ Roo.factory(conf, Roo.data); */ log : function(s) { - if ((typeof(console) == 'undefined') || typeof(console.log) == 'undefined')) { + if ((typeof(console) == 'undefined') || (typeof(console.log) == 'undefined')) { return; // alerT? } console.log(s); @@ -567,7 +567,23 @@ Roo.factory(conf, Roo.data); * you may want to set this to true. * @type Boolean */ - useShims : ((isIE && !isIE7) || (isGecko && isMac)) + useShims : ((isIE && !isIE7) || (isGecko && isMac)), + + + + /** + * Selects a single element as a Roo Element + * This is about as close as you can get to jQuery's $('do crazy stuff') + * @param {String} selector The selector/xpath query + * @param {Node} root (optional) The start of the query (defaults to document). + * @return {Roo.Element} + */ + selectNode : function(selector, root) + { + var node = Roo.DomQuery.selectNode(selector,root); + return node ? Roo.get(node) : new Roo.Element(false); + } + });