Pub/Sub for listening to postMessage events and managing allowed domains