Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dart - Isolate Cross Window Communication

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?

like image 846
user1752967 Avatar asked Jan 19 '26 09:01

user1752967


1 Answers

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).

like image 117
Lars Tackmann Avatar answered Jan 21 '26 02:01

Lars Tackmann



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!