MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / scrollbarWidth

Function scrollbarWidth

static/js/codemirror/codemirror.js:5054–5061  ·  view source on GitHub ↗
(measure)

Source from the content-addressed store, hash-verified

5052
5053 var knownScrollbarWidth;
5054 function scrollbarWidth(measure) {
5055 if (knownScrollbarWidth != null) return knownScrollbarWidth;
5056 var test = elt("div", null, null, "width: 50px; height: 50px; overflow-x: scroll");
5057 removeChildrenAndAdd(measure, test);
5058 if (test.offsetWidth)
5059 knownScrollbarWidth = test.offsetHeight - test.clientHeight;
5060 return knownScrollbarWidth || 0;
5061 }
5062
5063 var zwspSupported;
5064 function zeroWidthElement(measure) {

Callers 1

updateScrollbarsFunction · 0.85

Calls 2

eltFunction · 0.85
removeChildrenAndAddFunction · 0.85

Tested by

no test coverage detected