3 ms·
Multi Browser Window Apps
- tobiu 6y agoAn early heads up about what I am working on inside the neo.mjs context. Please do not confuse this with multi page apps. It is like a SPA, where multiple browser windows can connect to a shared app worker. ``` onAppConnect(name) { let me = this, view; console.log('onAppConnect', name); switch (name) { case 'Covid2': view = me.getReference('controls-panel'); Neo.getComponent(view.parentId).remove(view, false); Neo.apps[name].on('render', () => { setTimeout(() => { Neo.apps[name].mainViewInstance.add(view); }, 100); }); } } ``` You will be able to move entire component tress into different windows. Without even needing to create new JS instances. As easy as this.
- amadeuspagel 6y agoCool idea. One of the things that make web IDEs impossible to use for me is that I keep hitting Ctrl+W trying to close the tab in the IDE, but instead closing the browser tab with the IDE. And you can't rebind Ctrl+W with JS, because that's something spam sites would abuse. Maybe you could build a web IDE that uses the browsers tab system with this. This would also mean support for multiple screens, which even desktop IDEs don't support. EDIT: I don't really get the demo app. How do you open a new window with it?
- tobiu 6y agoAgain: super early stage, not fully functional yet. The version inside the video is not deployed to the online examples yet (will add it once ready). You can just clone the neomjs/neo repo and try it locally if you like to. What I did was opening: https://github.com/neomjs/neo/tree/dev/apps/sharedcovid https://github.com/neomjs/neo/tree/dev/apps/sharedcovid (index.html) inside a first browser window and then opening: https://github.com/neomjs/neo/tree/dev/apps/sharedcovid2 https://github.com/neomjs/neo/tree/dev/apps/sharedcovid2 inside the second window. we could spawn new popup windows as well. working on the dom event support next, after moving components around. it might be an easy fix just adjusting the appName config of the moved cmp tree, otherwise i need to look into the postMessages routing. gutt feeling: 2-3 more days.