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

Function monitorThemeChange

codebase/sources/dhtmlxscheduler.js:7603–7614  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

extend$3Function · 0.70

Calls 1

setSkinMethod · 0.65

Tested by

no test coverage detected