JQuery 1.8b1: what’s new?
blog.jquery.com
blog.jquery.com
I am interested, though, that the team has finally noticed that optional code should be the norm. Resig himself has been quoted as wanting nothing to do with it[0].
However, omitting every single "module" only truncates 2484 lines, which leaves the 1.8.1b source at a staggering 6763 lines of code. There is still a great deal of work to be done before "modular" is a fair term to apply to the API.
[1] https://groups.google.com/forum/#!topic/jquery-bugs-team/2zb...
JavaScript doesn't have a formal notion of a module. What we're referring to here is the ability to exclude some chunk of functionality from jQuery and know that, internally, jQuery does not require it. We cannot know whether other code on the page requires it.
> optional code should be the norm
Is there an easy way to know what is "optional" code when including third-party plugins, short of analyzing all the code in advance? That's what Closure Compiler AO does, but it is not for the weak.
> There is still a great deal of work to be done before "modular" is a fair term to apply to the API.
If you've got some ideas we're open to suggestions.
So there are CSS properties with vendor specific implementation, how are they going to handle that? Also what if the browser (like Chrome) changes its spec.? This could break your current code.
How exactly do you handle the "change in spec" case in your code right now?
Events such as ajaxStart fired by $.ajax
can currently be attached to any element–even
to elements that are not in a document at all!
This creates an inefficient special case,
so we will eventually remove that ability
and fire ajax events only on document.
I need to look into this. If you are using jQuery outside of a standard browser environment this might be problematic.Looks like they are not being removed but that you should attach to document only.
I still don't think it is a bad thing to remove $.browser since it does encourage good code practice, but there is a lovely irony that to decrease code size in jQuery core, plug-ins will likely need to have increase their size.
Anybody have any data on this?
So to say jQuery "powers" half the major websites on the Internet is like saying "Cup holders power 99% of all passenger vehicles world-wide".
http://wappalyzer.com/categories/javascript-frameworks
It's a different statistic but does make the 50% seem reasonable.
I remember reading somewhere that 1.8 would drop support for quirks mode in IE. Anybody know if this ended up happening? I didn't see any mention in this post.
How about having the jQuery functionality on mobile device?, Recommended reading http://en.wikipedia.org/wiki/JQuery
The C vs. Assembly argument is such a silly non-point; apples and artichokes.
And JQuery is much more than just a selector engine.
Edit: typos
document.body.addEventListener("click", function(e) {
if (e.target.className == "clicky") {
doSomething();
}
}, false);Try loading a page without script bloat and you'll see a noticeable difference.
Many Quirks pages could still use jQuery 1.8 successfully if they avoid asking for dimensional measurements, but I'm not sure why developers would still use quirks since it throws IE into prehistoric mode and has serious performance impacts.