I have two browser tabs, tab1 and tab2.
I have a function called execute in tab1, which I would like to call from the page in tab2.
Is that possible and if s
There's a tiny open-source component to sync/lock/call code in multiple tabs that allows you send messages between tabs (DISCLAIMER: I'm one of the contributors!)
https://github.com/jitbit/TabUtils
That can be called like this:
TabUtils.BroadcastMessageToAllTabs("messageName", data);
And then in another tab:
TabUtils.OnBroadcastMessage("messageName", function (data) {
//do something
});
It is based on the onstorage
event, you can simply modify the code for you need, it's very simple.