项目作者: Comandeer

项目描述 :
Small experiment
高级语言: HTML
项目地址: git://github.com/Comandeer/tabs-tracker.git
创建时间: 2016-03-17T19:24:52Z
项目社区:https://github.com/Comandeer/tabs-tracker

开源协议:

下载


What is it?

It’s a small experiment with trying to get list of user’s open tabs. It requires the pages to have a small tracker script, so probably you are not able to use it in practice – unless you’re a Facebook engineer working on “Like it!” widget.

That page has a tracker built-in. To see it in action, just open the console and open this page a few times in new tabs – the result should be updated in real time. It is of course cross-domain, just check a tracked page on bzdety.comandeer.pl.

If you’re curious how I did it – the tracker uses two techniques: cross-tab communication via storage event and communication between iframe and parent’s window via postMessage API.

Tested in latest Chrome and Firefox.