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

Function monitorThemeChange

codebase/sources/dhtmlxscheduler.es.js:7599–7610  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7597 }
7598 let monitorIntervalId = null;
7599 function monitorThemeChange() {
7600 const container = scheduler2.$container;
7601 clearInterval(monitorIntervalId);
7602 if (container) {
7603 monitorIntervalId = setInterval(() => {
7604 const csstheme = getComputedStyle(container).getPropertyValue("--dhx-scheduler-theme");
7605 if (csstheme && csstheme !== scheduler2.skin) {
7606 scheduler2.setSkin(csstheme);
7607 }
7608 }, 100);
7609 }
7610 }
7611 scheduler2.attachEvent("onDestroy", function() {
7612 clearInterval(monitorIntervalId);
7613 });

Callers 1

extend$3Function · 0.70

Calls 1

setSkinMethod · 0.65

Tested by

no test coverage detected