Skip to content

Ability to modify browser-window options in the new-window event #2823

Closed

Description

@MichaelOstermann

Hi!

In the issue #2100 it was decided that new browser-window instances which were opened via window.open automatically inherit the node-integration option of the parent window.

I've run into the scenario of having a window open with node-integration turned on, which opens the Dropbox Filepicker. They use global define/require methods and it breaks with the inherited node-integration option. I can not catch the new-window event and open a window myself, because their API uses the direct reference to the parent window which you get from the window.open method.

Would it be possible to modify the options used for creating such a window, like:

win.webContents.on('new-window', function(event, url, frameName, disposition, windowOptions) {
    windowOptions['node-integration'] = false;
});

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions