across-tabs

Easily communicate among browser tabs

Reviews

Discussion

You need to become a Contributor to join the discussion - Find out how.
Varun MalhotraMaker@s0ftvar · Software Engineer, Wingify
Hello, People! What is it? A JavaScript library to easily communicate among browser tabs (supports cross-origin). http://recordit.co/dIP9w9jM3v Why I created this? We at VWO, the world's easiest A/B testing tool, provide a feature called Heatmap(https://vwo.com/features/#heatma...). Opening different real-time heatmaps on the user's actual website(s) is a bit tricky. To communicate with different browser tabs and sharing information to and fro becomes tedious while handling references. Also, there are so many restrictions while dealing with Cross-Origin Domains, where cookies, localStorage, and sessionStorage all have their own limitations. AcrossTabs to the rescue. AcrossTabs uses PostMessage API to communicate and thus allows Cross-Origin sharing of data. Features 1. Safely enables cross-origin communication among different browser tabs. Uses PostMessage API for communication. 2. Easy to hook custom callback at various levels. Eg: executing a custom method in Child's tab on receiving a message from Parent tab. 3. Option to provide data-tab-opener="name" attribute on the target link/button(which opens up a new tab), so that it remains to disable until Child tab initiates a handshake and is received by the Parent tab 4. Fully fledged API to get information regarding the tabs(Parent and Child tabs) and other communication-related methods. 5. Exports in a UMD format i.e. library works everywhere. 6. Only 4.11 KB gzipped. PS: I'm the developer of AcrossTabs(https://github.com/wingify/acros...).
Olivier deLamarzelle@tiekks · iOS Lead Dev
Thank you for sharing ! Might be very useful for future projects....