forked from electron/electron
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: implement <webview> using contextBridge (electron#29037)
* refactor: implement <webview> using contextBridge * chore: address PR feedback * chore: address PR feedback * fix: check for HTMLIFrameElement instance in attachGuest
- Loading branch information
Showing
17 changed files
with
220 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
/* global nodeProcess, isolatedWorld */ | ||
/* global isolatedApi */ | ||
|
||
import type * as webViewElementModule from '@electron/internal/renderer/web-view/web-view-element'; | ||
|
||
process._linkedBinding = nodeProcess._linkedBinding; | ||
|
||
const v8Util = process._linkedBinding('electron_common_v8_util'); | ||
|
||
const webViewImpl = v8Util.getHiddenValue(isolatedWorld, 'web-view-impl'); | ||
|
||
if (webViewImpl) { | ||
if (isolatedApi.guestViewInternal) { | ||
// Must setup the WebView element in main world. | ||
const { setupWebView } = require('@electron/internal/renderer/web-view/web-view-element') as typeof webViewElementModule; | ||
setupWebView(webViewImpl as any); | ||
setupWebView(isolatedApi); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.