How does jQuery Migrate plugin look for old code?

493 views Asked by At

Just a conceptual question. Does the migrate plugin search through the javascript files pulled in by the browser? Or does the migrate plugin only look through code that is being executed by the server?

I need to use the jquery migrate plugin to update my code to the latest version of jquery. I'm trying to replace all instances of code stripped away in previous version and replace it with the latest ones.

1

There are 1 answers

2
charlietfl On

From jQuery migrate docs:

Upgrading libraries such as jQuery can be a lot of work, when breaking changes have been introduced. jQuery Migrate makes this easier, by restoring the APIs that were removed, and additionally shows warnings in the browser console (development version of jQuery Migrate only) when removed and/or deprecated APIs are used.

That way you can spot and fix what otherwise would have been errors, until you no longer need jQuery Migrate and can remove it.


Does it look through your files? No. It only warns when deprecated methods have been called from within your code