> Just an optimization, but it would be good to have the > .destructiveMethod(selector, function) case not create a new object since it > doesn't (permanently) change the original object. It looks like _pushStack > will stack the old jQuery object's nodes in the new jQuery object, which it > won't use. The internal stack has been replaced by the prevObject chain, > which is a good thing because it makes earlier states easily accessible via > simple object references. Before, we couldn't get to the internal stack > without .end()ing.
Yeah, in the end, the new pushStack would have to be smarter (probably just implementing the current feature set of pushStack, but with using references instead of an array stack). This is good enough for people to, at least, start using a 'cleaner' version of jQuery. Although, in thinking about it, this new version will probably use much less memory than the previous version. Hmm, it would be interesting to test this further. --John _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
