MCPcopy Create free account
hub / github.com/TruthHun/BookStack / registerGlobalHandlers

Function registerGlobalHandlers

static/mergely/lib/codemirror.js:8474–8487  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8472 globalsRegistered = true;
8473 }
8474 function registerGlobalHandlers() {
8475 // When the window resizes, we need to refresh active editors.
8476 var resizeTimer;
8477 on(window, "resize", function() {
8478 if (resizeTimer == null) resizeTimer = setTimeout(function() {
8479 resizeTimer = null;
8480 forEachCodeMirror(onResize);
8481 }, 100);
8482 });
8483 // When the window loses focus, we want to show the editor as blurred
8484 on(window, "blur", function() {
8485 forEachCodeMirror(onBlur);
8486 });
8487 }
8488
8489 // FEATURE DETECTION
8490

Callers 1

ensureGlobalHandlersFunction · 0.70

Calls 2

forEachCodeMirrorFunction · 0.70
onFunction · 0.50

Tested by

no test coverage detected