use standards-based event handling, remove on unmount