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

Method onStateChange

codebase/sources/dhtmlxscheduler.es.js:9013–9021  ·  view source on GitHub ↗
(handler)

Source from the content-addressed store, hash-verified

9011 }
9012 }
9013 onStateChange(handler) {
9014 this.onStateChangeHandlers.push(handler);
9015 return () => {
9016 const index = this.onStateChangeHandlers.indexOf(handler);
9017 if (index !== -1) {
9018 this.onStateChangeHandlers.splice(index, 1);
9019 }
9020 };
9021 }
9022 _notifyStateChange(oldState, newState) {
9023 this.onStateChangeHandlers.forEach((handler) => handler(oldState, newState));
9024 }

Callers 1

constructorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected