Joshimuz / mcbingo

A Minecraft Bingo sheet generator
GNU Affero General Public License v3.0
28 stars 19 forks source link

Migrate to newer jQuery #88

Closed rybak closed 3 years ago

rybak commented 3 years ago

As #62 has shown, mcbingo uses a fairly old version of jQuery – version 1.11.1 from 2014. We should attempt migrating to newer version. Newer version will allow us to use better APIs.

There aren't that many calls to jQuery in the codebase at the moment. We can manually check every call to see if anything changed in later versions of jQuery. For example, click() is used in three places, but not all three check the argument in the handler. So we should check whether or not Event objects still have the same fields, which are used by our handlers.

Going through every call to jQuery will also help gathering information about what to test before merging.

rybak commented 3 years ago

I've migrated my local copy to 3.6.0, and so far haven't found any issues. I'll go through the code as outlined above and open a pull request.

rybak commented 3 years ago

Tested every invocation of $ in Firefox with jQuery 3.6.0. Will test Chromium tomorrow. Update 2021-03-17: tested in Chromium as well.

rybak commented 3 years ago

I've been also reading the jQuery's upgrade guides and deprecation notes.

Update 2021-03-17: went through every release in deprecation notes – mcbingo doesn't use any deprecated functions.