use correct parameter for CustomEvent constructor; r=jedp

Per https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent, the second parameter to the constructor requires certain keywords. This change correctly uses one of them.