If I'm to upgrade jquery, and I use jquery-migrate to give me warnings on depreciated code, do I need to exercise all functions on the page to catch all things to upgrade, or is it enough to load each page and see if the console log shows errors?
I guess and hope the latter, as no script is generated on the fly or other exotic ideas to make the javascript change after loading.
The jquery-migrate plugins triggers a warning whenever a deprecated function is called. As such, it's necessary to test all functions on the page: simply loading the page won't show all the errors.
I whipped up a simple example that shows this:
If you run the snippet, you'll see an error when the page loads, warning that you can't use the
clickshorthand (you need to use.on()).If you then click on the button, you'll see a new warning, saying that you can't use the
focusshorthand (you need to user.trigger()).As you can see, the second error doesn't show up when the page loads, so you need to test all your functions.