Proposal: New parameter to traversal callbacks

Proposal: New parameter to traversal callbacks

At the moment, traversal callbacks, like the ones passed to find/filter/etc. take a single "index" parameter. I'd like to propose that they are unified with .each as follows:<div>
</div><div>$("div").filter(function(i, self) {</div>
<div>  // stuff</div><div>});</div><div>
</div><div>As a separate concern, I'd like to discuss changing the second parameter in both to be a jQuery object. Obviously, it would need to be done via slow deprecation for .each, but I don't think it'd break all that much code:</div>
<div>
</div><div>$("div").filter(function(i, self) {</div><div>  // self == $(this)</div><div>})</div><div>
</div><div>Thoughts?<br clear="all">
--
Yehuda Katz
Developer | Engine Yard
(ph) 718.877.1325
</div>