-
Notifications
You must be signed in to change notification settings - Fork 0
Maksym Stoyanov edited this page Aug 23, 2024
·
4 revisions
EventEmitter - бібліотека для Google Apps Script, яка реалізує обробку подій.
Назва | Короткий опис |
---|---|
EventEmitter | |
Emitter | |
Event | |
Listener |
Метод | Тип повернення | Короткий опис |
---|---|---|
newEmitter(...args) |
Emitter | |
create(...args) |
Emitter | |
createEmitter(...args) |
Emitter | |
newEvent(...args) |
Event | |
newListener(...args) |
Listener | |
isEmitter(input) |
boolean | |
isEvent(input) |
boolean | |
isListener(input) |
boolean |
Метод | Тип повернення | Короткий опис |
---|---|---|
normalize(input, eventNames = []) |
string[] |
Метод | Тип повернення | Короткий опис |
---|---|---|
addListener(eventName, callback, once = false) |
Emitter | |
on(eventName, callback, once = false) |
Emitter | |
subscribe(eventName, callback, once = false) |
Emitter | |
append(eventName, callback, once = false) |
Emitter | |
removeListener(eventName, listener) |
Emitter | |
off(eventName, listener) |
Emitter | |
unsubscribe(eventName, listener) |
Emitter | |
removeAllListeners(eventName = null) |
Emitter | |
offAll(eventName = null) |
Emitter | |
unsubscribeAll(eventName = null) |
Emitter | |
emit(eventName, ...args) |
boolean | |
trigger(eventName, ...args) |
boolean | |
publish(eventName, ...args) |
boolean | |
getEvents() |
Event[] | |
removeEvent(eventName) |
Emitter | |
getEventNames() |
string[] | |
eventNames() |
string[] | |
getListeners(eventName) |
Listener[] | |
listeners(eventName) |
Listener[] | |
addOnceListener(eventName, callback) |
Emitter | |
once(eventName, callback) |
Emitter | |
prependListener(eventName, callback) |
Emitter | |
prepend(eventName, callback) |
Emitter | |
prependOnceListener(eventName, callback) |
Emitter | |
prependOnce(eventName, callback) |
Emitter |
Метод | Тип повернення | Короткий опис |
---|---|---|
getEmitter |
Emitter | |
getParent |
Emitter | |
getName() |
string | |
addListener(callback, once = false) |
Event | |
on(callback, once = false) |
Event | |
subscribe(callback, once = false) |
Event | |
append(callback, once = false) |
Event | |
removeListener(listener) |
Event | |
off(listener) |
Event | |
unsubscribe(listener) |
Event | |
removeAllListeners |
Event | |
offAll |
Event | |
unsubscribeAll |
Event | |
emit(...args) |
boolean | |
trigger(...args) |
boolean | |
publish(...args) |
boolean | |
getListeners() |
Listener[] | |
addOnceListener(callback) |
Event | |
once(callback) |
Event | |
prependListener(callback, once = false) |
Event | |
prepend(callback, once = false) |
Event | |
prependOnceListener(callback) |
Event |
Метод | Тип повернення | Короткий опис |
---|---|---|
getEmitter() |
Emitter | |
getEvent() |
Event | |
getParent() |
Event | |
emit(...args) |
boolean | |
trigger(...args) |
boolean | |
publish(...args) |
boolean |