Description:
In the VSCode codebase, event types like 'mouseup', 'contextmenu', etc., are often hardcoded instead of using predefined constants such as those in dom.EventType
Proposed Solution:
Replace hardcoded event names with the corresponding constants available in EventType.
For example:
// Current usage:
dom.addDisposableListener(target, 'mouseup', callback);
// Suggested usage:
dom.addDisposableListener(target, dom.EventType.MOUSE_UP, callback);
Issue found in files:
src/vs/editor/browser/editorDom.ts
src/vs/workbench/electron-sandbox/parts/titlebar/titlebarPart.ts