]> source.dussan.org Git - jquery.git/commit
A more modest valHooks proposal
authortimmywil <tim.willison@thisismedium.com>
Sat, 2 Apr 2011 21:05:04 +0000 (17:05 -0400)
committertimmywil <tim.willison@thisismedium.com>
Sat, 2 Apr 2011 21:05:04 +0000 (17:05 -0400)
commit64a0005a3b5a168a421efa1d8b253de234620229
tree5cc4cfa47b885968e7ca84ce6b076387f7798420
parentff06d411d2569a3464fee7dda0580ee60f834b70
A more modest valHooks proposal

- The main difference is that this does not allow arbitrarily adding hooks to any collection of elements.

- Modularizes val into a set of easily maintainable and conditional hooks.

- valHooks is placed at jQuery.valHooks

  + This could technically be extended, but I do not see it being used except in very rare cases since you can only apply valHooks to nodeNames and input types, and not a collection of elements as before. We could theoretically privatize valHooks taking it off of jQuery and only use it internally for our own convenience, but again, I do not believe this patch carries with it the dangers of the first proposal.

- Slightly improved performance of val on radios and checkboxes for browsers that support checkOn, given the conditional attachment of its hook.
src/attributes.js