You'll want to change CustomEvent(...) to new CustomEvent(...)