Pass it.detail as context to CustomEvent listeners

Saves 8 chararacters a pop.

Also reduce repetition with custom event helper definition.