The HTML5 postMesssage API allows sending message between window opener and openee. However, it requires reference/linkage to the receiver window.
Is there a pure client side JavaScript way to broadcast events to all window subscriber, under same doaminname, opened by user (e.g. Duplicate Tab) same session, without help of server?
For now, I come up with few ideas
Is there a API I missed?
BTW, No cross-domain is need. I am thinking of same domain, multiple open by user.
For whom is looking for workaround solution.
I end up using window.localStorage (not even sessionStorage) and use the onstorage trigger my event handler.
There is some problem about session isolation on some browser(well, I mean IE), that the change on sessionStorage may or may not dispatch to another window. Meanwhile localStorage does better.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With