How can I use the BroadcastChannel API or something similar in Safari 10+?
问题 Problem: I need a client-side Javascript solution (jQuery is fine) where an event in one browser window/tab can be broadcast to other windows/tabs on the same domain. For example, if a cart is updated in tab A, tabs B and C get notified so we can update some info on the page, or notify the user that page is stale, or something like that. What I've tried: The BroadcastChannel API fits my needs perfectly, but does not work in IE 11 or Safari. So I tried this polyfill so I could use the