Fix 'dom/event' module bug and change `for` code style