Mattermost, Inc.

Window.open() Functionality in Desktop application

For feature requests, please see: http://www.mattermost.org/feature-requests/.

Summary

I am trying to open a new window in windows desktop application through the Developer Tools but it seems to return a BroserWindowProxy object rather than opening a new window.

Steps to reproduce

open the Developer Tool for windows application and type the following in console:

window.open('','_blank','height:200,width:200')

Expected behavior

Ideally it should open a new blank window as I have not provided any URL. It is not working even if I provide a url in window.open() method.

Observed behavior

It return a BrowserWindowProxy object.

Please let me know if I am missing something or it should be done any other way.

Thanks

Hi Mahipal,

Returning BrowserWindowProxy is intended behavior of Electron, which is the framework we are using to create the desktop app.

Just curious, why do you need a new blank window?

Hi yuya,

Thanks for replying.
I am trying to render a custom Component inside the new window.
Somehow, I am able to do that in Mattermost Web but unable to replicate the same in Desktop application.
In case you want some more insight on what I am trying to achieve, you can check this out.

Any help is appreciated.

Thanks.

Hi Mahipal,

Possibly nativeWindowOpen of webPreferences would help that. I have never used this option, so I’m not sure whether it’s appropriate.