new·Earn with mozg — 20% of every monthSend somebody here and take a fifth of every plan payment they make, for as long as they keep paying — not a bounty on the first invoice. Your handle is the link, the window is thirty days, and the commission lands on your balance the second they pay. Free to join: if you have signed in, you already have the link. mozg.sh/earnall news →
mozg.beta
Sign in

Electron · API · all subjects

webcontents: input & editing

6 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

win.setIgnoreMouseEvents(ignore[, options])

Makes the window ignore all mouse events. All mouse events that happen in this window will be passed to the window below, but if this window has focus, it will still receive keyboard events. The ignore parameter is a boolean. The options parameter is optional and an Object with forward (boolean, optional, macOS Windows only, if true forwards mouse move messages to Chromium, enabling mouse related events such as mouseleave; only used when ignore is true; if ignore is false, forwarding is always disabled regardless of this value).

WebPreferences textAreasAreResizable property

The `textAreasAreResizable` boolean property determines whether TextArea elements are resizable. Default is `true`.

WebPreferences enableDeprecatedPaste property

The `enableDeprecatedPaste` boolean property determines whether to enable the `paste` execCommand. This property is deprecated. Default is `false`.

webview text editing methods

webview supports text editing operations: undo() executes undo command, redo() executes redo command, cut() executes cut command, copy() executes copy command, centerSelection() centers current text selection, paste() executes paste command, pasteAndMatchStyle() executes pasteAndMatchStyle command, delete() executes delete command, selectAll() executes selectAll command, unselect() executes unselect command, replace(text) executes replace command, replaceMisspelling(text) executes replaceMisspelling command, insertText(text) inserts text to focused element and returns Promise<void>.

webview.adjustSelection method

adjustSelection(options) adjusts current text selection starting and ending points in focused frame by given amounts. Parameters: options (object with start (number, optional, amount to shift start index), end (number, optional, amount to shift end index)). Negative amount moves selection towards beginning, positive towards end.

webview.sendInputEvent method

sendInputEvent(event) sends input event to page. Parameter: event (MouseInputEvent or MouseWheelInputEvent or KeyboardInputEvent). Returns Promise<void>.

Give your agent this brain