MCPcopy Create free account
hub / github.com/DHTMLX/scheduler / detach

Method detach

codebase/dhtmlxscheduler.es.js:669–681  ·  view source on GitHub ↗
(i)

Source from the content-addressed store, hash-verified

667 this._socket.send(JSON.stringify({ action: "subscribe", name: i }));
668 }
669 detach(i) {
670 if (!i) {
671 if (this._mode == 3)
672 for (const a in this._events)
673 this._socket.send(JSON.stringify({ action: "unsubscribe", key: a }));
674 return void (this._events = {});
675 }
676 const { id: t, name: n } = i, s = this._events[n];
677 if (s) {
678 const a = s.filter((o) => o.id != t);
679 a.length ? this._events[n] = a : (delete this._events[n], this._mode == 3 && this._socket.send(JSON.stringify({ action: "unsubscribe", name: n })));
680 }
681 }
682 fire(i, t) {
683 const n = this._events[i];
684 if (n)

Callers 3

tFunction · 0.45
detachMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected