handlers(type) {
      const h = this._handlers,
        a = [];
      if (type) {
        a.push(...h[this.eventName(type)]);
      } else {
        for (const k in h) {
          a.push(...h[k]);
        }
      }
      return a;
    }
Returns an array with registered event handlers.
@param {string} [type] - The event type to query. Any annotations
  are ignored; for example, for the argument "click.foo", ".foo" will
  be ignored and the method returns all "click" handlers. If type is
  null or unspecified, this method returns handlers for all types.
@return {Array} - A new array containing all registered event handlers.