[pLog-svn] r5778 - plog/trunk/js/ui
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Fri Aug 3 16:11:51 EDT 2007
Author: oscar
Date: 2007-08-03 16:11:50 -0400 (Fri, 03 Aug 2007)
New Revision: 5778
Modified:
plog/trunk/js/ui/dom.js
Log:
Added the method Lifetype.Dom.getElementsByTagName.
Modified: plog/trunk/js/ui/dom.js
===================================================================
--- plog/trunk/js/ui/dom.js 2007-08-02 21:15:44 UTC (rev 5777)
+++ plog/trunk/js/ui/dom.js 2007-08-03 20:11:50 UTC (rev 5778)
@@ -51,4 +51,19 @@
elem = document.getElementById( elemId );
if( elem )
elem.innerHTML = content;
+}
+
+/**
+ * Returns a list of elements by tag name. For performance
+ * reasons, it is advisable to pass a root element as the second
+ * parameter or else a full search starting with the 'document'
+ * object will be performed.
+ *
+ * @param tagName
+ * @param rootElem
+ * @return An array of objects
+ */
+Lifetype.Dom.getElementsByTagName = function( tagName, rootElem )
+{
+ return( YAHOO.util.Dom.getElementsBy( function( elem ) { return( true ); }, tagName, rootElem ));
}
\ No newline at end of file
More information about the pLog-svn
mailing list