Add debounce for resize event, and ability to send custom event to listen to.