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:
trop[bot]
2021-09-09 11:54:13 +02:00
committed by GitHub
parent a2929226d2
commit f75b755f21
4 changed files with 53 additions and 0 deletions

View File

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