move createCustomEventWrapper into EventHandler closure
debounce scroll, resize and mouse move events