@skrillex1224/playwright-toolkit 2.1.249 → 2.1.251
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/dist/browser.js +6 -1
- package/dist/browser.js.map +2 -2
- package/dist/index.cjs +34 -16
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +34 -16
- package/dist/index.js.map +2 -2
- package/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/browser.js
CHANGED
|
@@ -2734,6 +2734,7 @@ var ActorInfo = {
|
|
|
2734
2734
|
key: "baidu",
|
|
2735
2735
|
name: "\u767E\u5EA6AI\u641C",
|
|
2736
2736
|
domain: "www.baidu.com",
|
|
2737
|
+
device: Device.Mobile,
|
|
2737
2738
|
path: "/s",
|
|
2738
2739
|
share: {
|
|
2739
2740
|
mode: "response",
|
|
@@ -3501,7 +3502,11 @@ var RuntimeEnv = {
|
|
|
3501
3502
|
// 指纹、时区、UA、viewport 的回放发生在 launch.js 启动阶段,不在这里做。
|
|
3502
3503
|
async applyToPage(page, source = {}, options = {}) {
|
|
3503
3504
|
if (!page) return;
|
|
3504
|
-
|
|
3505
|
+
let state = normalizeRuntimeState(source, (options == null ? void 0 : options.actor) || "");
|
|
3506
|
+
if (typeof (options == null ? void 0 : options.preapply) === "function") {
|
|
3507
|
+
state = await options.preapply(state) || state;
|
|
3508
|
+
rememberRuntimeState(state);
|
|
3509
|
+
}
|
|
3505
3510
|
Object.defineProperty(page, PageRuntimeStateKey, {
|
|
3506
3511
|
configurable: true,
|
|
3507
3512
|
enumerable: false,
|