Paul Krill
Editor at Large

jQuery turns 10 — and hits 3.0 beta

news
Jan 15, 20162 mins

The JavaScript library gets a multitude of changes, including closer matching with HTML5 dataset spec

Just in time for the technology’s 10th anniversary, popular JavaScript library jQuery has gone into a beta release stage with its 3.0 version.

Among key features in version 3.0 is an updating of .data() implementation to more closely match the HTML5 dataset specification. “All keys are now converted from kebab-case to camelCase, regardless of access method, and digits no longer participate in the conversion,” said jQuery Core team member Timmy Willison in a blog post. JQuery.Deferred objects, meanwhile, have been updated to be compatible with the Promises/A+ and ECMAScript 2015 promises. This required changes to the .then() method.

Also, there have been “massive speedups” for some jQuery custom selectors. “Thanks to some detective work by Paul Irish at Google, we identified some cases where we could skip a bunch of extra work when custom selectors like :visible are used many times in the same document. That particular case is up to 17 times faster now,” said Willison.

Another change involves .show and .hide methods. Developers with jQuery 3.0 alpha had experimented with treating these methods like an inline-display-none-remover (.show()) and inline-display-none-adder (.hide()). “This had the advantage of simplifying these methods greatly and improving performance — it required much fewer calculations. However, this proved to be problematic for our users,” Willison said. “Removing inline display:none did not always show the element (if the element was hidden from the stylesheet, for example), and that is far too common. We realized we couldn’t provide a simple way for jQuery plug-ins, especially, to ensure that an element was shown.” Thusly, jQuery developers have reverted that change; changes that have been kept for show and hide methods should have less impact on code, he said.

A jQuery Migrate 3.0 plug-in is planned, to help identify compatibility issues in code. Developers anticipate some breaking changes with the upgrade, and jQuery’s builders dropped support for jQuery Compat to offer compatibility with more browsers but possibly at the expense of file size and performance. “On January 12, Microsoft dropped support for IE8, IE9, and IE10. We’re not going to go that far just yet, but we are dropping support for IE8. And with IE8, so goes jQuery Compat, gone before we even released a final version. There will only be one jQuery from now on,” Willison said.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author