MCPcopy Index your code
hub / github.com/easydiffusion/easydiffusion / fireEvent

Method fireEvent

ui/media/js/utils.js:575–598  ·  view source on GitHub ↗
(name, ...args)

Source from the content-addressed store, hash-verified

573 }
574 }
575 fireEvent(name, ...args) {
576 if (!this.#types.includes(name)) {
577 throw new Error(`Event ${String(name)} missing from Events.types`)
578 }
579 if (!this.#events.hasOwnProperty(name)) {
580 return Promise.resolve()
581 }
582 if (!args || !args.length) {
583 args = []
584 }
585 const evs = this.#events[name]
586 if (evs.length <= 0) {
587 return Promise.resolve()
588 }
589 return Promise.allSettled(
590 evs.map((callback) => {
591 try {
592 return Promise.resolve(callback.apply(SD, args))
593 } catch (ex) {
594 return Promise.reject(ex)
595 }
596 })
597 )
598 }
599}
600
601class ServiceContainer {

Callers 7

setServerStatusFunction · 0.80
healthCheckFunction · 0.80
enqueueMethod · 0.80
postMethod · 0.80
postMethod · 0.80
continueTasksFunction · 0.80
startCheckFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected