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

Function checkIfBorderBoxStyling

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

Source from the content-addressed store, hash-verified

7533 }
7534 var cachedBorderBoxValue;
7535 function checkIfBorderBoxStyling() {
7536 if (scheduler2._is_material_skin()) {
7537 return true;
7538 } else {
7539 if (cachedBorderBoxValue === void 0) {
7540 var probe = document.createElement("div");
7541 probe.style.position = "absolute";
7542 probe.style.left = "-9999px";
7543 probe.style.top = "-9999px";
7544 probe.innerHTML = "<div class='dhx_cal_container'><div class='dhx_cal_data'><div class='dhx_cal_event'><div class='dhx_body'></div></div><div>";
7545 document.body.appendChild(probe);
7546 var styles = window.getComputedStyle(probe.querySelector(".dhx_body"));
7547 var boxSizing = styles.getPropertyValue("box-sizing");
7548 document.body.removeChild(probe);
7549 cachedBorderBoxValue = !!(boxSizing === "border-box");
7550 if (!cachedBorderBoxValue) {
7551 setTimeout(function() {
7552 cachedBorderBoxValue = void 0;
7553 }, 1e3);
7554 }
7555 } else {
7556 return cachedBorderBoxValue;
7557 }
7558 }
7559 }
7560 function refreshAfterLoad() {
7561 if (scheduler2._is_material_skin() || scheduler2._border_box_events()) {
7562 return;

Callers 2

refreshAfterLoadFunction · 0.70
extend$3Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected