MCPcopy Create free account
hub / github.com/sql-js/sql.js / scrollbarWidth

Function scrollbarWidth

GUI/codemirror/lib/codemirror.js:7153–7160  ·  view source on GitHub ↗
(measure)

Source from the content-addressed store, hash-verified

7151
7152 var knownScrollbarWidth;
7153 function scrollbarWidth(measure) {
7154 if (knownScrollbarWidth != null) return knownScrollbarWidth;
7155 var test = elt("div", null, null, "width: 50px; height: 50px; overflow-x: scroll");
7156 removeChildrenAndAdd(measure, test);
7157 if (test.offsetWidth)
7158 knownScrollbarWidth = test.offsetHeight - test.clientHeight;
7159 return knownScrollbarWidth || 0;
7160 }
7161
7162 var zwspSupported;
7163 function zeroWidthElement(measure) {

Callers 1

updateScrollbarsFunction · 0.85

Calls 2

eltFunction · 0.85
removeChildrenAndAddFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…