5 ms·
I think I understand what this does, but I don't think I understand the use case. Does anyone have any real-world examples of where this helps?
by martin-adams 10y ago
I think I understand what this does, but I don't think I understand the use case. Does anyone have any real-world examples of where this helps?
- onion2k 10y agoIf you build browser-based applications that open websites in new tabs and programatically interact with them then I imagine it'd be handy. I'm making a test builder to generate user scripts and e2e tests more easily, so having the app open in one tab talking to a site you're working with in another would be a possible use case. I've actually written my app as Chrome devtools extension though, so it already has access to everything through a background script and an injected content script. If I ever move it to being web-based I'd use something like this to do communication between tabs. Looking at Wingify's website it seems they're doing something similar with A/B testing - they (presumably) have an app that sits in one tab and a two of copies of the target site in two more tabs, so changes made in their app are reflected in the two versions of the target site. That's a total guess though.
- softvar 10y agoYea, that's a good use case you mentioned regarding the browser-build application. Why we want this library, at Wingify, is something related to heatmaps and showing previews of changes made to the site in new tabs. Please read the detailed explanation I gave to @martin-adams in the above comment.
- seibelj 10y agoWe had this exact problem before, we had a single-page-app console for sales agents and they would open up a lot of tabs, one for each conversation. If we didn't sync between the tabs, a lot of alerts and whatnot would have been duplicated.
- tokenizerrr 10y agoIs that cross origin though?
- softvar 10y agoYes, there are many. I'm a developer at Wingify, an A/B Testing tool and we are using this library I created a few days back. We have something called heatmaps - https://vwo.com/features/#heatmaps-clickmaps https://vwo.com/features/#heatmaps-clickmaps To view a heatmap, user has to enter a URL, select date-range(Optional), and select the segmentation(eg. Direct, Referral, Location, Device, etc.)(optional). A new tab is opened up with the specified URL each time on clicking the generate button. So, let's say, you have to view heatmap of your site for: 1.The last week and only for those who live in US 2. The last week and only for those who uses Windows 3. The last month and who came directly to your site 4. The entire duration of the campaign and for all users Now, for each configuration, there's an opened tab with the specified URL opened in it and the data for the requested segments and dates. To pass on the data to and fro from one tab to another, and to track the status of all tabs(active/close), to notify other tabs when one gets closed, to notify all the children tabs when the opener tab gets closed, to send a message to a specific tab(eg. change segment) and to send a message to all tabs(eg. fetch data for new date applied), this library comes in handy. All this can be achieved with its simple API. Hope you get the gist now.