diff options
| author | Stephen Blott | 2016-01-31 16:57:07 +0000 |
|---|---|---|
| committer | Stephen Blott | 2016-01-31 16:57:07 +0000 |
| commit | 541dadb2872690876c3ca7c79d567881558327e2 (patch) | |
| tree | d4021dad5f6c9172193116a9a87f03e1a7512882 | |
| parent | aad03c6d834d81d52c99d62f77fa87d0e5b3384f (diff) | |
| download | vimium-541dadb2872690876c3ca7c79d567881558327e2.tar.bz2 | |
Pass arguments to modes' onExit handlers.
| -rw-r--r-- | content_scripts/mode.coffee | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/content_scripts/mode.coffee b/content_scripts/mode.coffee index c7c6bd55..5cc8800e 100644 --- a/content_scripts/mode.coffee +++ b/content_scripts/mode.coffee @@ -187,12 +187,12 @@ class Mode onExit: (handler) -> @exitHandlers.push handler - exit: -> + exit: (args...) -> if @modeIsActive @log "deactivate:", @id unless @modeIsExiting @modeIsExiting = true - handler() for handler in @exitHandlers + handler args... for handler in @exitHandlers handlerStack.remove handlerId for handlerId in @handlers Mode.modes = Mode.modes.filter (mode) => mode != @ @modeIsActive = false |
