--- Comment #4 from Krinkle <krinklem...@gmail.com> ---
> (In reply to James Forrester from comment #1)
> > Tony, are you planning to take on this bug?
> I plan to. But is there anything like bind() is only present in modern
> browsers ?
Indeed, Function.prototype.bind is new in ECMAScript 5, which VisualEditor
requires. Or rather, VE requires ECMAScript 3 syntax engine and an environment
that somehow provides certain ES5 features, which can potentially be
polyfilled. We don't yet (and that is by design), adopt any ES5 syntax or ES5
features that can't be polyfilled.
This is already guarded against using the feature test in our mw integration
init, so you can rely on this without having to worry about old browsers.
(In reply to Roan Kattouw from comment #3)
I'd recommend #2 for consistency (we do the same with other ES5 features we've
adopted) and minor performance micro optimisation (extra global and property,
extra callstack because it has to be a proxy calling bind, unlike Array.isArray
is can't be assigned to ve.bind by reference because bind needs to be bound
itself) and because we're already using '.bind' in a few places.
But keeping ve.bind with a small wrapper to bind using bind seems fine for
backwards compatibility with ve plugins in the wild. But I'd recommend we don't
use this in core.
You are receiving this mail because:
You are on the CC list for the bug.
Wikibugs-l mailing list