playwright-core 1.54.0-alpha-2025-07-08 → 1.54.0-alpha-2025-07-09

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/browsers.json CHANGED
@@ -15,15 +15,15 @@
15
15
  },
16
16
  {
17
17
  "name": "chromium-tip-of-tree",
18
- "revision": "1343",
18
+ "revision": "1345",
19
19
  "installByDefault": false,
20
- "browserVersion": "139.0.7258.0"
20
+ "browserVersion": "140.0.7271.0"
21
21
  },
22
22
  {
23
23
  "name": "chromium-tip-of-tree-headless-shell",
24
- "revision": "1343",
24
+ "revision": "1345",
25
25
  "installByDefault": false,
26
- "browserVersion": "139.0.7258.0"
26
+ "browserVersion": "140.0.7271.0"
27
27
  },
28
28
  {
29
29
  "name": "firefox",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  {
41
41
  "name": "webkit",
42
- "revision": "2189",
42
+ "revision": "2191",
43
43
  "installByDefault": true,
44
44
  "revisionOverrides": {
45
45
  "debian11-x64": "2105",
@@ -127,6 +127,7 @@ class BrowserContext extends import_channelOwner.ChannelOwner {
127
127
  this._channel.on("requestFailed", ({ request, failureText, responseEndTiming, page }) => this._onRequestFailed(network.Request.from(request), responseEndTiming, failureText, import_page.Page.fromNullable(page)));
128
128
  this._channel.on("requestFinished", (params) => this._onRequestFinished(params));
129
129
  this._channel.on("response", ({ response, page }) => this._onResponse(network.Response.from(response), import_page.Page.fromNullable(page)));
130
+ this._channel.on("recorderEvent", ({ event, data }) => this._onRecorderEventSink?.(event, data));
130
131
  this._closedPromise = new Promise((f) => this.once(import_events.Events.BrowserContext.Close, f));
131
132
  this._setEventToSubscriptionMapping(/* @__PURE__ */ new Map([
132
133
  [import_events.Events.BrowserContext.Console, "console"],
@@ -355,11 +356,11 @@ class BrowserContext extends import_channelOwner.ChannelOwner {
355
356
  }
356
357
  async _unrouteInternal(removed, remaining, behavior) {
357
358
  this._routes = remaining;
359
+ if (behavior && behavior !== "default") {
360
+ const promises = removed.map((routeHandler) => routeHandler.stop(behavior));
361
+ await Promise.all(promises);
362
+ }
358
363
  await this._updateInterceptionPatterns();
359
- if (!behavior || behavior === "default")
360
- return;
361
- const promises = removed.map((routeHandler) => routeHandler.stop(behavior));
362
- await Promise.all(promises);
363
364
  }
364
365
  async _updateInterceptionPatterns() {
365
366
  const patterns = network.RouteHandler.prepareInterceptionPatterns(this._routes);
@@ -445,9 +446,15 @@ class BrowserContext extends import_channelOwner.ChannelOwner {
445
446
  await this._channel.close(options);
446
447
  await this._closedPromise;
447
448
  }
448
- async _enableRecorder(params) {
449
+ async _enableRecorder(params, callback) {
450
+ if (callback)
451
+ this._onRecorderEventSink = callback;
449
452
  await this._channel.enableRecorder(params);
450
453
  }
454
+ async _disableRecorder() {
455
+ this._onRecorderEventSink = void 0;
456
+ await this._channel.disableRecorder();
457
+ }
451
458
  }
452
459
  async function prepareStorageState(platform, options) {
453
460
  if (typeof options.storageState !== "string")
@@ -442,11 +442,11 @@ class Page extends import_channelOwner.ChannelOwner {
442
442
  }
443
443
  async _unrouteInternal(removed, remaining, behavior) {
444
444
  this._routes = remaining;
445
+ if (behavior && behavior !== "default") {
446
+ const promises = removed.map((routeHandler) => routeHandler.stop(behavior));
447
+ await Promise.all(promises);
448
+ }
445
449
  await this._updateInterceptionPatterns();
446
- if (!behavior || behavior === "default")
447
- return;
448
- const promises = removed.map((routeHandler) => routeHandler.stop(behavior));
449
- await Promise.all(promises);
450
450
  }
451
451
  async _updateInterceptionPatterns() {
452
452
  const patterns = import_network.RouteHandler.prepareInterceptionPatterns(this._routes);