Method
delWait
(key: EditorValueKey, fn: any)
Source from the content-addressed store, hash-verified
| 238 | } |
| 239 | |
| 240 | private delWait(key: EditorValueKey, fn: any) { |
| 241 | const waits = this.waits.get(key) |
| 242 | if (!waits) { |
| 243 | return |
| 244 | } |
| 245 | let i = waits.length |
| 246 | while (i--) { |
| 247 | if (waits[i].resolve === fn) { |
| 248 | waits.splice(i, 1) |
| 249 | } |
| 250 | } |
| 251 | if (waits.length < 1) { |
| 252 | this.waits.delete(key) |
| 253 | } |
| 254 | } |
| 255 | |
| 256 | onBeforeInit(listener: (editor: Editor) => void) { |
| 257 | this.eventBus.on(EDITOR_EVENT.BEFORE_INIT, listener) |
Tested by
no test coverage detected