| changeset 47 | c0b4a8b5a012 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/toolkit/javascript/d3/src/core/selection-node.js Thu Apr 10 14:20:23 2014 +0200 @@ -0,0 +1,9 @@ +d3_selectionPrototype.node = function(callback) { + for (var j = 0, m = this.length; j < m; j++) { + for (var group = this[j], i = 0, n = group.length; i < n; i++) { + var node = group[i]; + if (node) return node; + } + } + return null; +};