mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
feat: add webContents.fromDevToolsTargetId() (#30731)
* feat: add webContents.fromDevToolsTargetId() * refactor: avoid using FromOrCreate Co-authored-by: samuelmaddock <samuel.maddock@gmail.com>
This commit is contained in:
@@ -723,6 +723,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