Dart - Isolate Cross Window Communication

你。 提交于 2019-12-11 02:32:28

问题


Is cross-window communication possible with Dart isolates? Here is my scenario: User opens web site in browser window A and window A spawns a new isolate. The user then clicks a link that creates a new tab and opens browser window B (assume the link is in the same domain, etc...). Can browser window B send and receive messages from the isolate spawned by browser window A, and if so, how?


回答1:


Cross window communication is not possible using isolates messaging alone. However you can do cross window communication using postMessage as described here and then set up message handlers that communicates with each isolate (there by using postMessage as a sort of message bus between each isolate).



来源:https://stackoverflow.com/questions/12933142/dart-isolate-cross-window-communication

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!