MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / $emit

Method $emit

frontend/src/tools/sandbox.ts:30–41  ·  view source on GitHub ↗
(event: string, ...args: any[])

Source from the content-addressed store, hash-verified

28 }
29
30 public $emit(event: string, ...args: any[]) {
31 const callbacks = this._callbacks.get(event);
32 if (callbacks && callbacks.length > 0) {
33 callbacks.forEach((callback) => {
34 try {
35 callback.call(null, ...args);
36 } catch (error: any) {
37 reportErrorMsg(error);
38 }
39 });
40 }
41 }
42
43 public $destroySandbox() {
44 this.$emit("onUnmounted");

Callers 2

$destroySandboxMethod · 0.95
$mountSandboxMethod · 0.95

Calls 2

reportErrorMsgFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected