Pass selector first to CommandRegistry::add

This commit is contained in:
Nathan Sobo
2014-09-05 09:49:25 -06:00
parent 4de0865d28
commit aee33fc126
2 changed files with 15 additions and 15 deletions

View File

@@ -9,7 +9,7 @@ class CommandRegistry
constructor: (@rootNode) ->
@listenersByCommandName = {}
add: (commandName, selector, callback) ->
add: (selector, commandName, callback) ->
unless @listenersByCommandName[commandName]?
@rootNode.addEventListener(commandName, @dispatchCommand, true)
@listenersByCommandName[commandName] = []