A pub-sub style API for postMessage communications