Add jQuery Migrate
authorTimo Tijhof <krinklemail@gmail.com>
Mon, 5 May 2014 16:33:23 +0000 (18:33 +0200)
committerKrinkle <krinklemail@gmail.com>
Thu, 8 May 2014 23:51:54 +0000 (23:51 +0000)
commite5502d1ffabab7784d85df42cbb3370ce92b0d6d
treef5ac3b7617f52fe5a8e4dcb443a4b11c8dac477a
parente404c01589ee4c78f29998e7b72327a0c54421b0
Add jQuery Migrate

We're currently on jQuery v1.8.3. jQuery v1.9 introduces breaking
changes. The jQuery Migrate plugin adds a compatibility layer
that brings back most removed or altered functionality.

It can also be loaded on an older version of jQuery to make use
of the plugins' accessor tracking that helps finding code
that makes use of the deprecated functionality prior to upgrading.

Code:
 http://code.jquery.com/jquery-migrate-1.2.1.js

Info:
 http://blog.jquery.com/2013/01/15/jquery-1-9-final-jquery-2-0-beta-migrate-final-released/
 http://jquery.com/upgrade-guide/1.9/#jquery-migrate-plugin
 https://github.com/jquery/jquery-migrate/

> The plugin can be included with versions of jQuery as old as
> 1.6.4 to identify potential upgrade issues via its JQMIGRATE
> console warnings. However, the plugin is only required for
> version 1.9.0 or higher to restore deprecated and removed
> functionality.

Loading it alongside jquery.js should be harmless. However to
benefit performance, I'm only loading it in debug mode.

Plus, there's a small chance that it does actually change
functionality because of the way it is implemented. The plugin
always overloads the methods with compatibility versions, which
should effectively be a no-op on top of old version of jQuery
like ours (one that already has the old functionality), but it
feels too risky at this stage when our only intent is
instrumentation.

Bug: 44740
Change-Id: I468d6b45eae8368fac6af746bbb2ccb702f862ff
resources/Resources.php
resources/lib/jquery/jquery.migrate.js [new file with mode: 0644]