javascript mediator for incoming heterogen events.