Author: jvloothuis
Date: Mon Feb 19 21:39:46 2007
New Revision: 39217
Modified:
kukit/kukit.js/trunk/kukit/selectorreg.js
Log:
Made parentnode check for node before using the original node
Modified: kukit/kukit.js/trunk/kukit/selectorreg.js
==============================================================================
--- kukit/kukit.js/trunk/kukit/selectorreg.js (original)
+++ kukit/kukit.js/trunk/kukit/selectorreg.js Mon Feb 19 21:39:46 2007
@@ -125,8 +125,12 @@
kukit.selectorTypesGlobalRegistry.register('parentnode', function(expr, node,
orignode) {
var selectednodes = kukit.dom.cssQuery(expr);
+
+ var node = orignode || node; // TODO: Explain to me (Jeroen) what node vs
+ // orignode should do and why we have
both.
+
var parentnodes = [];
- var parentnode = orignode.parentNode;
+ var parentnode = node.parentNode;
while(parentnode.parentNode) {
parentnodes.push(parentnode);
parentnode = parentnode.parentNode;
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins