# Window.open() Functionality in Desktop application

**URL:** <https://forum.mattermost.com/t/window-open-functionality-in-desktop-application/4762>\
**Category:** Troubleshooting\
**Created:** [April 11, 2018, 12:14pm UTC](https://forum.mattermost.com/t/window-open-functionality-in-desktop-application/4762 "2018-04-11T12:14:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mahipal](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@Mahipal](https://forum.mattermost.com/u/Mahipal)\
**Post date:** [April 11, 2018, 12:14pm UTC](https://forum.mattermost.com/t/window-open-functionality-in-desktop-application/4762/1 "2018-04-11T12:14:32Z")

</div>

For feature requests, please see: [Contributing Feature Proposals - Mattermost](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

---

<div class="post-metadata">

**Author:** ![yuya-oc](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/yuya-oc/32/614_2.png) [@yuya-oc](https://forum.mattermost.com/u/yuya-oc)\
**Post date:** [April 11, 2018, 12:50pm UTC](https://forum.mattermost.com/t/window-open-functionality-in-desktop-application/4762/2 "2018-04-11T12:50:41Z")

</div>

Hi Mahipal,

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

> **[window.open Function | Electron](https://electronjs.org/docs/api/window-open)**
>
> Open a new window and load a URL.

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

---

<div class="post-metadata">

**Author:** ![Mahipal](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@Mahipal](https://forum.mattermost.com/u/Mahipal)\
**Post date:** [April 11, 2018, 1:20pm UTC](https://forum.mattermost.com/t/window-open-functionality-in-desktop-application/4762/3 "2018-04-11T13:20:04Z")

</div>

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](https://stackoverflow.com/questions/49767544/window-open-is-not-working-in-desktop-application?noredirect=1#comment86550541_49767544) out.

Any help is appreciated.

Thanks.

---

<div class="post-metadata">

**Author:** ![yuya-oc](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/yuya-oc/32/614_2.png) [@yuya-oc](https://forum.mattermost.com/u/yuya-oc)\
**Post date:** [April 11, 2018, 2:03pm UTC](https://forum.mattermost.com/t/window-open-functionality-in-desktop-application/4762/4 "2018-04-11T14:03:26Z")

</div>

Hi Mahipal,

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

> **[window.open Function | Electron](https://electronjs.org/docs/api/window-open#using-chromes-windowopen-implementation)**
>
> Open a new window and load a URL.
