3 ms·
An 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 brow
by tobiu 6y ago
An 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.