roojs-debug.js
authorAlan Knowles <alan@akbkhome.com>
Wed, 9 Feb 2011 07:10:07 +0000 (15:10 +0800)
committerAlan Knowles <alan@akbkhome.com>
Wed, 9 Feb 2011 07:10:07 +0000 (15:10 +0800)
roojs-debug.js

index 54f0335..0e51225 100644 (file)
@@ -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 : element(selector, root) 
+        {
+            var node = Roo.DomQuery.selectNode(selector,root);
+            return node ? Roo.get(node) : false;
+        }
+        
     });