JavaScript implementation of the Publish/Subscribe pattern for same page message brokering