MCPcopy Create free account
hub / github.com/breck7/scroll / registerGlobalHandlers

Function registerGlobalHandlers

external/.scrollLibs.js:8945–8960  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8943 globalsRegistered = true
8944 }
8945 function registerGlobalHandlers() {
8946 // When the window resizes, we need to refresh active editors.
8947 var resizeTimer
8948 on(window, "resize", function () {
8949 if (resizeTimer == null) {
8950 resizeTimer = setTimeout(function () {
8951 resizeTimer = null
8952 forEachCodeMirror(onResize)
8953 }, 100)
8954 }
8955 })
8956 // When the window loses focus, we want to show the editor as blurred
8957 on(window, "blur", function () {
8958 return forEachCodeMirror(onBlur)
8959 })
8960 }
8961 // Called when the window resizes
8962 function onResize(cm) {
8963 var d = cm.display

Callers 1

ensureGlobalHandlersFunction · 0.85

Calls 2

forEachCodeMirrorFunction · 0.85
onFunction · 0.70

Tested by

no test coverage detected