diff --git a/lib/browser/api/web-contents.ts b/lib/browser/api/web-contents.ts index 9b2a15acccc40..5705cec695a07 100644 --- a/lib/browser/api/web-contents.ts +++ b/lib/browser/api/web-contents.ts @@ -692,8 +692,8 @@ WebContents.prototype._init = function () { // TODO(zcbenz): The features string is parsed twice: here where it is // passed to C++, and in |makeBrowserWindowOptions| later where it is // not actually used since the WebContents is created here. - // We should be able to remove the latter once the |nativeWindowOpen| - // option is removed. + // We should be able to remove the latter once the |new-window| event + // is removed. const { webPreferences: parsedWebPreferences } = parseFeatures(rawFeatures); // Parameters should keep same with |makeBrowserWindowOptions|. const webPreferences = makeWebPreferences({ diff --git a/lib/browser/guest-window-manager.ts b/lib/browser/guest-window-manager.ts index 924fb0f7af6e9..9815865f72499 100644 --- a/lib/browser/guest-window-manager.ts +++ b/lib/browser/guest-window-manager.ts @@ -196,10 +196,10 @@ function makeBrowserWindowOptions ({ embedder, features, overrideOptions }: { height: 600, ...parsedOptions, ...overrideOptions, - // Note that for |nativeWindowOpen: true| the WebContents is created in - // |api::WebContents::WebContentsCreatedWithFullParams|, with prefs - // parsed in the |-will-add-new-contents| event. - // The |webPreferences| here is only used by |nativeWindowOpen: false|. + // Note that for normal code path an existing WebContents created by + // Chromium will be used, with web preferences parsed in the + // |-will-add-new-contents| event. + // The |webPreferences| here is only used by the |new-window| event. webPreferences: makeWebPreferences({ embedder, insecureParsedWebPreferences: parsedWebPreferences,