mirror of
https://github.com/electron/electron.git
synced 2026-01-10 07:58:08 -05:00
feat: add webContents.fromDevToolsTargetId() (#29399)
* feat: add webContents.fromDevToolsTargetId() * refactor: avoid using FromOrCreate
This commit is contained in:
@@ -769,6 +769,10 @@ export function fromId (id: string) {
|
||||
return binding.fromId(id);
|
||||
}
|
||||
|
||||
export function fromDevToolsTargetId (targetId: string) {
|
||||
return binding.fromDevToolsTargetId(targetId);
|
||||
}
|
||||
|
||||
export function getFocusedWebContents () {
|
||||
let focused = null;
|
||||
for (const contents of binding.getAllWebContents()) {
|
||||
|
||||
Reference in New Issue
Block a user