Lightweight JavaScript eventing