Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/queuepro/node_modules/simplebar/src/ drwxrwxr-x | |
| Viewing file: Select action/file-type: import canUseDOM from 'can-use-dom';
import { getElementDocument } from "./helpers";
let cachedScrollbarWidth = null;
let cachedDevicePixelRatio = null;
if (canUseDOM) {
window.addEventListener('resize', () => {
if (cachedDevicePixelRatio !== window.devicePixelRatio) {
cachedDevicePixelRatio = window.devicePixelRatio;
cachedScrollbarWidth = null;
}
});
}
export default function scrollbarWidth(el) {
if (cachedScrollbarWidth === null) {
const document = getElementDocument(el);
if (typeof document === 'undefined') {
cachedScrollbarWidth = 0;
return cachedScrollbarWidth;
}
const body = document.body;
const box = document.createElement('div');
box.classList.add('simplebar-hide-scrollbar');
body.appendChild(box);
const width = box.getBoundingClientRect().right;
body.removeChild(box);
cachedScrollbarWidth = width;
}
return cachedScrollbarWidth;
}
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0155 ]-- |