dom/event: finish the compatibility layer