Simple events extension for JavaScript objects.