diff --git a/lib/browser/guest-view-manager.js b/lib/browser/guest-view-manager.js index 83a56827b25e..721da5acc444 100644 --- a/lib/browser/guest-view-manager.js +++ b/lib/browser/guest-view-manager.js @@ -184,6 +184,7 @@ const attachGuest = function (event, elementInstanceId, guestInstanceId, params) guestInstanceId: guestInstanceId, nodeIntegration: params.nodeintegration != null ? params.nodeintegration : false, plugins: params.plugins, + zoomFactor: embedder._getZoomFactor(), webSecurity: !params.disablewebsecurity, blinkFeatures: params.blinkfeatures, disableBlinkFeatures: params.disableblinkfeatures @@ -212,18 +213,15 @@ const attachGuest = function (event, elementInstanceId, guestInstanceId, params) return } - embedder.getZoomFactor(function (zoomFactor) { - webPreferences.zoomFactor = zoomFactor - webViewManager.addGuest(guestInstanceId, elementInstanceId, embedder, guest, webPreferences) - guest.attachParams = params - embedderElementsMap[key] = guestInstanceId + webViewManager.addGuest(guestInstanceId, elementInstanceId, embedder, guest, webPreferences) + guest.attachParams = params + embedderElementsMap[key] = guestInstanceId - guest.setEmbedder(embedder) - guestInstance.embedder = embedder - guestInstance.elementInstanceId = elementInstanceId + guest.setEmbedder(embedder) + guestInstance.embedder = embedder + guestInstance.elementInstanceId = elementInstanceId - watchEmbedder(embedder) - }) + watchEmbedder(embedder) } // Destroy an existing guest instance.