Skip to content

cleanup: Get rid of Lang.bind()

Florian Müllner requested to merge wip/fmuellner/cleanups into master

After replacing Lang.Class with ES6 classes and adopting arrow notation for anonymous callbacks, we only use the Lang module to bind this to named callbacks. However since ES5, this functionality is already provided by Function.prototype.bind() - in fact, Lang.bind() itself uses it when no extra arguments are specified. Just use the built-in function directly where possible, and use arrow notation in the few places where we pass additional arguments.

Merge request reports