From: Alan Knowles Date: Wed, 9 Feb 2011 07:07:33 +0000 (+0800) Subject: Roo.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=82cc7f3c1b7c21099bce1c0f7f35535d75170892 Roo.js --- diff --git a/Roo.js b/Roo.js index d9c659f862..f76abd4312 100644 --- a/Roo.js +++ b/Roo.js @@ -567,7 +567,22 @@ 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 + * @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; + } + });