Page MenuHomePhabricator

Proposal: remove domUtils.js in favor of direct use of jQuery
Closed, ResolvedPublic


The module ext.wikilambda.edit/mixins/domUtils.js only exports one function that is called only once in the code.

The module partially takes advantage of jQuery. A call to jQuery('my-selector').first().text('my-text') keeps only the first element matching the selector if any and change the text. If no element matches the selector, there is no error (the call to text() does nothing).

I feel like it can simplify a bit the code. What do you think?

Event Timeline

Change 828034 had a related patch set uploaded (by Teleosteen; author: Teleosteen):

[mediawiki/extensions/WikiLambda@master] Remove domUtils and use jQuery directly

Change 828034 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Remove domUtils and use jQuery directly