mathquill/mathquill — pull request #349 by laughinghan (2014-11-05 17:23:19+00:00)
Title: Fix configuring handlers on inner math fields

Recommend -w to view diff.

The original test case for handlers only tried passing them in to the
MathQuill.MathField() constructor, turns out in the constructor is the
only place where we called root.setHandlers(). So passing handlers
directly to the constructor worked, and globally configuring handlers
also worked on MathQuill.MathField()'s, but no other cases worked,
.config() doesn't and neither does the InnerMathField constructor.
In fact, there was no way at all to set handlers on
\\MathQuillMathField{}'s.

Now we ensure that .config() works, on both MathQuill.MathField's and on
\\MathQuillMathField{}'s, and that globally configuring handlers works
on both MathQuill.MathField's and on \\MathQuillMathField{}'s.

Also, fuck the Law of Demeter. Less indirection is what this feature
needs.