Merge branch 'master' of https://github.com/roojs/roojs1 into github
[roojs1] / Roo.js
diff --git a/Roo.js b/Roo.js
index bf4016a..7df38d2 100644 (file)
--- 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);
+        }
+        
     });