neutralinojs / roadmap

The roadmap of Neutralinojs
MIT License
61 stars 2 forks source link

adding - window.open #3

Closed condigital closed 2 years ago

condigital commented 2 years ago

appreciate the great effort you have put into this project.

I would like to know if it is possible to implement the window.open function to open a window in the same process.

being part of the same process both windows could communicate with each other and share cookies and other resources. in this way both windows can communicate with each other, father and child

win=window.open("","pop", "width=640,height=360,scrollbars=no,menubar=no,toolbar=no,status=no");
win.document.body.style="background-color:#335060;color:#FFF";
win.document.body.innerHTML="<h1>Testing</h1>";

Thank You, you are great.

danidre14 commented 2 years ago

The window.open option already works as you would use it in your general browser. If you mean opening multiple neu windows, then check window.create in the neu docs.

condigital commented 2 years ago

The window.open option already works as you would use it in your general browser. If you mean opening multiple neu windows, then check window.create in the neu docs.

Sorry But window.open is not working.. i have done many test

shalithasuranga commented 2 years ago

Hey.. @condigital Thanks for the feedback. Regarding the line "being part of the same process". It's not possible with the Neutralinojs model. Neutralinojs always runs one window on the main application process. But, it offers a way to create multiple windows via https://neutralino.js.org/docs/api/window#windowcreateurl-windowoptions as @danidre14 mentioned.

If you need to use the exact "window.open" method, I think you can write a wrapper for "window.create". But, window.create providers all stuff you need. I am closing this since Neutralinojs cannot spawn main windows on the same process and there is already window.create.