begin JS compat for event