refactor: Split 'Event' docs/types into more specific Event types (#17038)

* Event = Base event type (with preventDefault)
* IpcMainEvent = Event that ipcMain emits (with sender, reply, etc.)
* IpcRendererEvent = Event that ipcRenderer emits (with sender,
senderId, etc.)
* KeyboardEvent = Event that we emit with keyboard flags (ctrlKey,
altKey, etc.)

This will dramatically improve peoples TS experience with IPC events
This commit is contained in:
Samuel Attard 2019-02-19 09:24:19 +00:00 committed by Shelley Vohr
parent ef2e7d95fe
commit 3b74837020
22 changed files with 515 additions and 285 deletions

View file

@ -1,9 +1,3 @@
# Event Object extends `GlobalEvent`
* `preventDefault` VoidFunction
* `sender` WebContents
* `returnValue` any
* `ctrlKey` Boolean (optional) - whether the Control key was used in an accelerator to trigger the Event
* `metaKey` Boolean (optional) - whether a meta key was used in an accelerator to trigger the Event
* `shiftKey` Boolean (optional) - whether a Shift key was used in an accelerator to trigger the Event
* `altKey` Boolean (optional) - whether an Alt key was used in an accelerator to trigger the Event