jamietre / CsQuery

CsQuery is a complete CSS selector engine, HTML parser, and jQuery port for C# and .NET 4.
Other
1.16k stars 250 forks source link

Upgrade to jQuery 2.0? #127

Closed Arithmomaniac closed 10 years ago

Arithmomaniac commented 11 years ago

Currently, according to the README, jQuery is based on v1.6.2 (June 2011). A bit has changed since then.

As Issue 121 notes, there are things (like AndSelf) that have been deprecated for a while. But there are some bigger changes, such as the rewrite of Sizzle for v1.8 and simplification of the code base (by removing IE8 support) in 2.0 .

jamietre commented 11 years ago

Changes in 2.0 related to the dropping of browsers <IE8, as well as a lot of other changes over the last couple years, do not impact CsQuery because they relate to browser UI, e.g. deprecating "live" and adding "on". There's not really any notion of browser support for CsQuery (since there is no browser) so the difference between the 1.9 and 2.0 branches isn't really material.

Also, bear in mind that the primary driver behind the re-write for 2.0 is speed and size. Size is not a concern with CsQuery, so there is little incentive for me to deprecate features unless they seem to be causing more harm than good.

Speed is a concern, but CsQuery's code base has nothing in common with jQuery's. So the changes in Sizzle don't impact us at all. (CsQuery's CSS selection engine was not a port of Sizzle, it was written from the ground up).

My intent has been to keep CsQuery current as far as the DOM manipulation methods in jQuery are concerned, so the AndSelf method issue is relevant. But I haven't made a concerted effort to track it's API against jQuery versions because it's really only a subset of its functionality.

Probably, it would be worthwhile to do this going forward, even as the changes that impact CsQuery are infrequent, for completeness and so end users can be assured of what methods are available. But I don't think there's a huge amount of work needed to catch up right now.

I do have a lot of plans for a major rewrite in a 2.0 release of CsQuery, but these are mostly related to the DOM model (which wasn't especially well planned) and will not be backward compatible with the current 1.x code.

Arithmomaniac commented 11 years ago

That's reasonable :-)

benjamingr commented 11 years ago

@Arithmomaniac Related open issue for andSelf https://github.com/jamietre/CsQuery/issues/121