Discussion:
Selector.findChildElements patch
Eoghan
2008-12-01 13:52:58 UTC
Permalink
Below is a patch for findChildElements to make it look up the element
if it is passed by id rather than DOM reference:

Index: Selector.js
===================================================================
--- Selector.js (revision 1488)
+++ Selector.js (working copy)
@@ -341,6 +341,7 @@

/** @id MochiKit.Selector.findChildElements */
findChildElements: function (element, expressions) {
+ element = MochiKit.DOM.getElement(element);
var uniq = function(arr) {
var res = [];
for (var i = 0; i < arr.length; i++) {

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "MochiKit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to mochikit+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---
Per Cederberg
2008-12-01 14:36:11 UTC
Permalink
Thanks! It has been committed in r1489:

http://trac.mochikit.com/changeset/1489

Cheers,

/Per
Post by Eoghan
Below is a patch for findChildElements to make it look up the element
Index: Selector.js
===================================================================
--- Selector.js (revision 1488)
+++ Selector.js (working copy)
@@ -341,6 +341,7 @@
findChildElements: function (element, expressions) {
+ element = MochiKit.DOM.getElement(element);
var uniq = function(arr) {
var res = [];
for (var i = 0; i < arr.length; i++) {
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "MochiKit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to mochikit+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Loading...