Creating Custom Events

Why should you use CustomEvent instead of Event for creating custom events?
// Option A:
const event = new Event('userAction');

// Option B:
const event = new CustomEvent('userAction', {
  detail: { userId: 123, action: 'login' }
});
Next Question (2/20)