MCPcopy Create free account
hub / github.com/docker/getting-started / scrollbarSize

Function scrollbarSize

app/src/static/js/react-bootstrap.js:1346–1362  ·  view source on GitHub ↗
(recalc)

Source from the content-addressed store, hash-verified

1344var size;
1345
1346function scrollbarSize(recalc) {
1347 if (!size && size !== 0 || recalc) {
1348 if (_inDOM.default) {
1349 var scrollDiv = document.createElement('div');
1350 scrollDiv.style.position = 'absolute';
1351 scrollDiv.style.top = '-9999px';
1352 scrollDiv.style.width = '50px';
1353 scrollDiv.style.height = '50px';
1354 scrollDiv.style.overflow = 'scroll';
1355 document.body.appendChild(scrollDiv);
1356 size = scrollDiv.offsetWidth - scrollDiv.clientWidth;
1357 document.body.removeChild(scrollDiv);
1358 }
1359 }
1360
1361 return size;
1362}
1363
1364module.exports = exports["default"];
1365

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…