MCPcopy
hub / github.com/tinymce/tinymce / toggleGlobalEvents

Function toggleGlobalEvents

modules/tinymce/src/core/main/ts/api/EditorManager.ts:47–60  ·  view source on GitHub ↗
(state: boolean)

Source from the content-addressed store, hash-verified

45};
46
47const toggleGlobalEvents = (state: boolean) => {
48 if (state !== boundGlobalEvents) {
49 const DOM = DOMUtils.DOM;
50 if (state) {
51 DOM.bind(window, 'resize', globalEventDelegate);
52 DOM.bind(window, 'scroll', globalEventDelegate);
53 } else {
54 DOM.unbind(window, 'resize', globalEventDelegate);
55 DOM.unbind(window, 'scroll', globalEventDelegate);
56 }
57
58 boundGlobalEvents = state;
59 }
60};
61
62const removeEditorFromList = (targetEditor: Editor) => {
63 const oldEditors = editors;

Callers 2

addFunction · 0.85
removeFunction · 0.85

Calls 2

unbindMethod · 0.80
bindMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…