src/vs/base/browser/event.ts/DomEmitter/constructor
class DomEmitter:	constructor(element: EventHandler, type: K, useCapture?: boolean) {
		const fn = (e: Event) => this.emitter.fire(e as DOMEventMap[K]);
		this.emitter = new Emitter({
			onWillAddFirstListener: () => element.addEventListener(type, fn, useCapture),
			onDidRemoveLastListener: () => element.removeEventListener(type, fn, useCapture)
		});
	}