aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/mode.coffee
diff options
context:
space:
mode:
authorStephen Blott2016-01-31 16:57:07 +0000
committerStephen Blott2016-01-31 16:57:07 +0000
commit541dadb2872690876c3ca7c79d567881558327e2 (patch)
treed4021dad5f6c9172193116a9a87f03e1a7512882 /content_scripts/mode.coffee
parentaad03c6d834d81d52c99d62f77fa87d0e5b3384f (diff)
downloadvimium-541dadb2872690876c3ca7c79d567881558327e2.tar.bz2
Pass arguments to modes' onExit handlers.
Diffstat (limited to 'content_scripts/mode.coffee')
-rw-r--r--content_scripts/mode.coffee4
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