The jQuery Foundation and Standards

Posted on by

Over the years the jQuery Foundation has worked to give web developers a meaningful voice in the standards process. That’s why we’re excited to help formally establish our involvement in chapters.io, an effort that allows us to work with meetups and supporters around the globe to help developers learn more about recent standards and discuss current proposals.

Our inaugural event will be a regular forum co-organized by one of our own representatives and supported by Pittsburgh, PA’s Code and Supply and Bearded. On Tuesday, August 2nd, Brian Kardell will be presenting at Code and Supply’s regular meetup to talk more about standards and chapters. From there we’ll be organizing the first meeting. If you’re in Pittsburgh and you work on the Web, please come out. If you’re interested in hosting and organizing a meetup in your city, please open an issue on the jQuery Foundation’s standards team GitHub and we’ll try to find someone who can help coordinate.

The jQuery Foundation knows that the Web is at its best when developers are involved, but standards traditionally didn’t include that in their model. Standards were typically driven by browser makers and large companies with a significant stake in the outcome. Sometimes the standard made sense for those groups, but turned out to be less effective when deployed in the harsh reality of the Internet.

In October 2011, Addy Osmani wrote the post announcing the jQuery Standards Team on the blog, naming Yehuda Katz and Paul Irish to help represent the developer community in W3C and TC39. Over the years, numerous jQuery representatives have done a lot to advocate for developers and change the standards process for the better.

Standards have, in fact, improved a lot since then – and jQuery representatives past and present have helped at each step along the way.

In December 2012, we helped elect a slate of candidates to reform the W3C. In 2013, jQuery members like Yehuda Katz, myself (Brian Kardell), Paul Irish and Rick Waldron helped author The Extensible Web Manifesto. This document laid out a new vision for how we could re-focus standards, include the voices of developers and re-imagine a better future. Over the past couple of years, this vision has slowly become a driving force in each of the Web standards bodies. Then, in 2014, it was once again jQuery who called on the W3C’s annual meeting (TPAC) to officially adopt, support and find better ways to involve developers own voices.

The Extensible Web Manifesto is about many of the same principles that Addy expressed in that original post: It encourages standards bodies to give developers a say and create ways to tighten the feedback loop. As Addy eloquently expressed in that original post:

…How often do we all feel our voices, suggestions and ideas are heard by those groups responsible for defining these standards? The reality is that whilst many of us would like to see change, due to time restrictions and lengthy formal processes we’re unable to participate in standards discussions, get involved with writing specifications and contribute to meetings about the future of features. This makes it difficult for web developers to have a voice.

The traditional model of standards involvement does not work at scale. Millions of developers can’t fly to locations around the world for meetings, and a mailing list of millions doesn’t scale either. The aim of Chapters is to provide a conduit between developers and standards that makes it practical for everyone to be involved. If this sounds interesting, take part and get involved! Have your voice be heard!

jQuery 3.1.0 Released – No More Silent Errors

Posted on by

Not so long ago, we released jQuery 3.0. One of the major features of jQuery 3.0 was a small rewrite of jQuery Deferreds. Specifically, we made them compatible with the Promises/A+ spec. That basically meant that errors had to be silenced and passed as rejection values to rejection handlers (added using deferred.catch()). This had the advantage of preventing Promise handlers from getting blocked up by runtime errors, but the disadvantage of errors being silenced if no rejection handlers were added. While this was the right move for Deferreds, we had also changed jQuery.ready and jQuery.fn.ready to use the new spec-compliant Deferreds under the covers.

Unfortunately, if you were using the usual ways to attach ready handlers (e.g. jQuery(function() {}) and jQuery(document).ready(function() {})), you had no way to add a rejection handler. Plus, it wasn’t obvious that you were in Deferred land. Any runtime exceptions were getting swallowed and lost in space. I think they ended up somewhere near Pluto, which isn’t even a planet anymore! There were workarounds, but this wasn’t acceptable to us.

We immediately set out to fix this, and thus jQuery 3.1.0 was born. No longer will errors be silent! You will see them logged to the console by default. If you’d like to have more control on how these errors are handled, we also added an entry point: jQuery.readyException. In most cases, you won’t need to use it, but any errors that are thrown within a ready handler will get passed to this function should you need it.

jQuery.readyException =
  function(error) {
    // "error" is thrown from
    // any ready handler
  };

The default jQuery.readyException will re-throw the error asynchronously, to avoid stopping execution and log the error to the console. We hope this solves any debugging issues you may have experienced when using jQuery 3.0.

We do not expect this release to have any breaking changes, but if you do encounter bugs in upgrading from the previous version, please let us know.

If you’d like help upgrading from jQuery 1.x or 2.x to jQuery 3.0, please check out the 3.0 Upgrade Guide and the jQuery Migrate 1.4.1 blog post.

3.1.0GitHub changelog

Download

You can include these files directly from the jQuery CDN if you like, or copy them to your own local server.

https://code.jquery.com/jquery-3.1.0.js
https://code.jquery.com/jquery-3.1.0.min.js

Slim build

Sometimes you don’t need ajax, or you prefer to use one of the many standalone libraries that focus on ajax requests. And often it is simpler to use a combination of CSS and class manipulation for all your web animations. Along with the regular version of jQuery that includes the ajax and effects modules, we’ve released a “slim” version that excludes these modules. All in all, it excludes ajax, effects, and currently deprecated code. The size of jQuery is very rarely a load performance concern these days, but the slim build is about 6k gzipped bytes smaller than the regular version – 23.6k vs 30k. These files are also available in the npm package and on the CDN:

https://code.jquery.com/jquery-3.1.0.slim.js
https://code.jquery.com/jquery-3.1.0.slim.min.js

These updates are already available as the current versions on npm and Bower. Information on all the ways to get jQuery is available at https://jquery.com/download/. Public CDNs receive their copies today, please give them a few days to post the files. If you’re anxious to get a quick start, use the files on our CDN until they have a chance to update.

Many thanks to all of you who participated in this release by testing, reporting bugs, or submitting patches, including Oleg Gaidarenko, Micha? Go??biowski, and the whole jQuery team.