Page MenuHomePhabricator

WikiLove: Fix "JQMIGRATE: jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"
Closed, DeclinedPublic


When I click on Wikilove icon I get
"JQMIGRATE: jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"
in the console. This comes from jquery.ui 1.9.2:
!$( element ).parents().andSelf().filter(function() {

Version: master
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:35 AM
bzimport added a project: WikiLove.
bzimport set Reference to bz69350.
bzimport added a subscriber: Unknown Object (MLST).

The newer versions of jQuery UI use addBack() instead of andSelf(), otherwise the function is identical.

jQuery Migrate's warning about andSelf() is a bit early. It was *not* removed in jQuery 1.8 or any other version. It is still supported in jQuery 1.11 (latest) and 2.x.

So this isn't a perquisite for the current migration cycle of jQuery. jQuery UI chooses to continue using andSelf instead of addBack so that it is compatible with both old and new jQuery versions. If and when jQuery core removes andSelf, jQuery UI will likely use feature detection and thus no longer trigger this warning.