feat: emit devtools-open-url event for DevTools link selection (#36774)

* feat: emit event for DevTools link selection

* chore: devtools-open-in-new-tab -> devtools-open-url
This commit is contained in:
Shelley Vohr 2023-01-26 09:54:26 +01:00 committed by GitHub
parent 8d008c977d
commit 7d46d3ec9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 27 additions and 1 deletions

View file

@ -492,6 +492,14 @@ The `focus` and `blur` events of `WebContents` should only be used to detect
focus change between different `WebContents` and `BrowserView` in the same
window.
#### Event: 'devtools-open-url'
Returns:
* `url` string - URL of the link that was clicked or selected.
Emitted when a link is clicked in DevTools or 'Open in new tab' is selected for a link in its context menu.
#### Event: 'devtools-opened'
Emitted when DevTools is opened.

View file

@ -981,6 +981,14 @@ Returns:
Emitted when mouse moves over a link or the keyboard moves the focus to a link.
### Event: 'devtools-open-url'
Returns:
* `url` string - URL of the link that was clicked or selected.
Emitted when a link is clicked in DevTools or 'Open in new tab' is selected for a link in its context menu.
### Event: 'devtools-opened'
Emitted when DevTools is opened.