diff -r efd9c589177a -r c0b4a8b5a012 toolkit/javascript/d3/src/core/selection-call.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/toolkit/javascript/d3/src/core/selection-call.js Thu Apr 10 14:20:23 2014 +0200 @@ -0,0 +1,13 @@ +// +// Note: assigning to the arguments array simultaneously changes the value of +// the corresponding argument! +// +// TODO The `this` argument probably shouldn't be the first argument to the +// callback, anyway, since it's redundant. However, that will require a major +// version bump due to backwards compatibility, so I'm not changing it right +// away. +// +d3_selectionPrototype.call = function(callback) { + callback.apply(this, (arguments[0] = this, arguments)); + return this; +};