feat: add webContents.fromDevToolsTargetId() (#29399)

* feat: add webContents.fromDevToolsTargetId()

* refactor: avoid using FromOrCreate
This commit is contained in:
Samuel Maddock 2021-08-27 17:01:24 -04:00 committed by GitHub
parent 96131af5d3
commit 352ac21413
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 53 additions and 0 deletions

View file

@ -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()) {