aboutsummaryrefslogtreecommitdiffstats
path: root/lib/handler_stack.coffee
AgeCommit message (Collapse)Author
2015-01-05Modes; revise InsertMode as two classes.Stephen Blott
2015-01-04Modes; comment tweeks.Stephen Blott
2015-01-04Revise handler stack implementation.Stephen Blott
The old implementation: - Wasn't actually checking whether handlers had been removed before calling them. - Could end up calling the same handler twice (if a handler was removed further down the stack, and the stack elements moved due the resulting splice. Solution: - Mark elements as removed and check. Set their ids to null. - Don't splice stack. Also, optimisation: - Removing the element at the top of the stack is still O(1). - In Modes, reverse handlers before removing (so, more likely to hit the optimisation above). For the record, the stable stack length at the moment seems to be about 10-12 elements.
2015-01-03Modes; more renaming and refactoring.Stephen Blott
2015-01-03Modes; better constant naming.Stephen Blott
2015-01-02Modes; incorporate find mode.Stephen Blott
2015-01-02Modes; fix insert mode.Stephen Blott
2015-01-02Modes; rework badge handling and fix passkeys mode.Stephen Blott
2015-01-02Modes; better name for handlerStack.passDirectlyToPage.Stephen Blott
2015-01-01Modes; implement insert mode.Stephen Blott
2015-01-01Modes; minor changes.Stephen Blott
2015-01-01Modes; incorporate three test modes.Stephen Blott
As a proof of concept, this incorporates normal mode, passkeys mode and insert mode.
2014-12-31Modes proof-of-concept.Stephen Blott
2012-10-20Refactor handlerStack. Closes #657.Jez Ng
Previously, handlerStack was designed only for removal of the handler right at the top of the stack. However, some handlers sought to remove themselves when they were not at the top of the stack, creating confusion. The new handlerStack ensures that such removal can always be done safely.