cleaner DOM event handling in Map