chore: cleanup dead <webview> related code (#29039)

This commit is contained in:
Milan Burda 2021-05-06 22:56:05 +02:00 committed by GitHub
parent dab9a88413
commit cbba602eae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 18 deletions

View file

@ -34,12 +34,12 @@ const createGuest = function (embedder: Electron.WebContents, params: Record<str
const guest = (webContents as typeof ElectronInternal.WebContents).create({
type: 'webview',
partition: params.partition,
embedder: embedder
embedder
});
const guestInstanceId = guest.id;
guestInstances.set(guestInstanceId, {
guest: guest,
embedder: embedder
guest,
embedder
});
// Clear the guest from map when it is destroyed.
@ -165,7 +165,7 @@ const attachGuest = function (event: Electron.IpcMainInvokeEvent,
: null;
const webPreferences: Electron.WebPreferences = {
guestInstanceId: guestInstanceId,
guestInstanceId,
nodeIntegration: params.nodeintegration != null ? params.nodeintegration : false,
nodeIntegrationInSubFrames: params.nodeintegrationinsubframes != null ? params.nodeintegrationinsubframes : false,
plugins: params.plugins,