jayferd/latexlive — pull request #1 by laughinghan (2012-07-03 08:46:59+00:00)
Title: Reorganize textarea.js

Reorganize code based on invariants being maintained, like `flush` always being called first. Consolidating all the calls to `flush` to one event handler binding seems clearer than a bunch of disparate calls to `flush()` that are hopefully at the beginning of all the event handlers.

Separate `on*` event listener functions is like going back to DOM Level 0, one of the great things about jQuery is being able to attach multiple event listeners in a cross-browser compatible way.

See also [[textarea.js]]