constructor(type, options = {}) {
    super(type);

    this[kError] = options.error === undefined ? null : options.error;
    this[kMessage] = options.message === undefined ? '' : options.message;
  }
Create a new `ErrorEvent`.

@param {String} type The name of the event
@param {Object} [options] A dictionary object that allows for setting
    attributes via object members of the same name
@param {*} [options.error=null] The error that generated this event
@param {String} [options.message=''] The error message