event hooked by JS