Page MenuHomePhabricator

Remove use of ve.indexOf
Closed, ResolvedPublic1 Estimated Story Points

Description

I noticed we still have ve.indexOf.

Since we depend on ES5 now. There's no reason have this indirection through a jQuery callback. As the native implementation is an Array instance method (unlike static Array.isArray/jQuery.isArray), there is an unavoidable function and call-binding overhead from using jQuery.inArray.

We've done the same for ve.bind. Let's do this for ve.indexOf as well.

Event Timeline

Krinkle raised the priority of this task from to Needs Triage.
Krinkle updated the task description. (Show Details)
Krinkle subscribed.
Krinkle set Security to None.
Jdforrester-WMF moved this task from To Triage to Freezer on the VisualEditor board.

Yay. https://gerrit.wikimedia.org/r/195582

ve.utils: Remove ve.indexOf in favour of Array#indexOf
Change-Id: I019338a812c0f61ac8fcdc693ff1b4a1cb5089ad

And a search for "ve.indexOf" has only one match; the deprecated definition of ve.indexOf itself.