additional IF condition to patch a Blink regression of CustomEvent creation/dispatch