artursapek / mondrian

Web-based vector graphics editor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update to latest jQuery 2.x or Zepto (or drop it completely)

fbender opened this issue · comments

Your jQuery version is severly outdated, the current line is 1.11 or 2.1. This leads to at least one issue, I got this message in the command line (roughly translated):

12:56:00.209 getPreventDefault() should not be used anymore. Please use defaultPrevented instead. jquery-1.7.2.min.js:3

Though this may also result in more errors, mostly interoperability issues. Generally, you should switch to the 2.x line because it's more optimized (it dropped support for very old browsers) thus faster and smaller.

However, you should consider switching to zepto.js (which is mostly interoperable with jQuery) and only include the scripts you really need, that will increase performance even more.

I haven't looked at the code yet, however I suspect that you might be able to drop any library alltogether without too much effort, and at most use microlibraries for specific tasks (like key handling) and use other native APIs directly. Though that's probably a bigger task, and upgrading the library version should be a good first step. :)

I want to drop it completely. I don't really take advantage of it.

Part of the way into this project I started making an effort to use native APIs whenever I could, so removing it shouldn't be too hard. In the short term I'll upgrade to 1.11 on a branch and see if it breaks anything.

Closed in 89f5a2f

Is the "dropping it completely" goal tracked in an issue? If not, one should be opened.

Yes, it is. Good point.

#27 opened to address this. Still deciding if dropping it completely is a good idea. It doesn't seem like a good use of dev time.

For now it's an open question.