use correct parameter for CustomEvent constructor
Merge pull request #17141 from SamPenrose/982479-CustomEvent-fix

use correct parameter for CustomEvent constructor; r=jedp