mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-22 08:28:41 +03:00
doc: tweak eventNames param description
This commit is contained in:
parent
e50aa56d02
commit
c3045dd230
@ -6,11 +6,10 @@ _ = require 'underscore'
|
||||
module.exports =
|
||||
# Public: Associates an event name with a function to perform.
|
||||
#
|
||||
# This is called endlessly, until the event is turned {.off}. The {.on} method
|
||||
# calls an `eventName` only once.
|
||||
# This is called endlessly, until the event is turned {.off}.
|
||||
#
|
||||
# eventNames - A {String} name identifying one or more events
|
||||
# handler - A {Function} that's executed when the event is triggered
|
||||
# eventNames - A {String} containing one or more space-separated events.
|
||||
# handler - A {Function} that's executed when the event is triggered.
|
||||
on: (eventNames, handler) ->
|
||||
for eventName in eventNames.split(/\s+/) when eventName isnt ''
|
||||
[eventName, namespace] = eventName.split('.')
|
||||
@ -58,7 +57,7 @@ module.exports =
|
||||
|
||||
# Public: Stops executing handlers for a registered event.
|
||||
#
|
||||
# eventNames - A {String} name identifying one or more events
|
||||
# eventNames - A {String} containing one or more space-separated events.
|
||||
# handler - The {Function} to remove from the event. If not provided, all handlers are removed.
|
||||
off: (eventNames, handler) ->
|
||||
if eventNames
|
||||
|
Loading…
Reference in New Issue
Block a user