MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / constructor

Method constructor

javascript/selenium-webdriver/bidi/network.js:51–60  ·  view source on GitHub ↗

* Represents a Network object. * @constructor * @param {Driver} driver - The driver to fetch the BiDi connection. * @param {Array} browsingContextIds - An array of browsing context IDs that the network events will be subscribed to.

(driver, browsingContextIds)

Source from the content-addressed store, hash-verified

49 * @param {Array} browsingContextIds - An array of browsing context IDs that the network events will be subscribed to.
50 */
51 constructor(driver, browsingContextIds) {
52 this._driver = driver
53 this._browsingContextIds = browsingContextIds
54 this.#listener = new Map()
55 this.#listener.set(NetworkEvent.AUTH_REQUIRED, new Map())
56 this.#listener.set(NetworkEvent.BEFORE_REQUEST_SENT, new Map())
57 this.#listener.set(NetworkEvent.FETCH_ERROR, new Map())
58 this.#listener.set(NetworkEvent.RESPONSE_STARTED, new Map())
59 this.#listener.set(NetworkEvent.RESPONSE_COMPLETED, new Map())
60 }
61
62 addCallback(eventType, callback) {
63 const id = ++this.#callbackId

Callers

nothing calls this directly

Calls 1

setMethod · 0.65

Tested by

no test coverage detected