tted for the relevant window, because events
    // from inner frames can bubble to the windowRoot.
    if (event.target.defaultView === this.#window) {
      this.emit("DOMContentLoaded", { target: event.target });
    }
  };

  #onLoad = event => {
    // Check that this event was emitted for the relevant window, because events
    // from inner frames can bubble to the windowRoot.
    if (event.target.defaultView === this.#window) {
      this.emit("load", { target: event.target });
    }
  };
}
PK