From 82cc7f3c1b7c21099bce1c0f7f35535d75170892 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 9 Feb 2011 15:07:33 +0800 Subject: [PATCH] Roo.js --- Roo.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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; + } + }); -- 2.39.2