The JavaScript Events Model