patchright-core 1.52.5 → 1.55.1
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/ThirdPartyNotices.txt +65 -123
- package/bin/reinstall_chrome_beta_mac.sh +1 -1
- package/bin/reinstall_chrome_stable_mac.sh +1 -1
- package/bin/reinstall_msedge_beta_mac.sh +1 -1
- package/bin/reinstall_msedge_dev_mac.sh +1 -1
- package/bin/reinstall_msedge_stable_mac.sh +1 -1
- package/browsers.json +14 -14
- package/index.js +1 -1
- package/lib/androidServerImpl.js +4 -2
- package/lib/browserServerImpl.js +47 -12
- package/lib/cli/program.js +116 -50
- package/lib/cli/programWithTestStub.js +1 -1
- package/lib/client/android.js +30 -34
- package/lib/client/browser.js +54 -17
- package/lib/client/browserContext.js +67 -71
- package/lib/client/browserType.js +25 -34
- package/lib/client/channelOwner.js +20 -24
- package/lib/client/connection.js +6 -10
- package/lib/client/electron.js +8 -3
- package/lib/client/elementHandle.js +18 -21
- package/lib/client/fetch.js +5 -3
- package/lib/client/frame.js +54 -32
- package/lib/client/input.js +3 -1
- package/lib/client/jsHandle.js +4 -0
- package/lib/client/localUtils.js +0 -1
- package/lib/client/locator.js +30 -26
- package/lib/client/network.js +5 -12
- package/lib/client/page.js +32 -32
- package/lib/client/playwright.js +6 -16
- package/lib/client/selectors.js +18 -38
- package/lib/client/timeoutSettings.js +12 -8
- package/lib/client/tracing.js +24 -20
- package/lib/client/waiter.js +2 -2
- package/lib/client/webSocket.js +4 -22
- package/lib/generated/bindingsControllerSource.js +28 -0
- package/lib/generated/clockSource.js +1 -1
- package/lib/generated/injectedScriptSource.js +1 -1
- package/lib/generated/pollingRecorderSource.js +1 -1
- package/lib/generated/storageScriptSource.js +28 -0
- package/lib/generated/utilityScriptSource.js +1 -1
- package/lib/generated/webSocketMockSource.js +12 -50
- package/lib/inProcessFactory.js +9 -6
- package/lib/outofprocess.js +0 -2
- package/lib/protocol/validator.js +421 -345
- package/lib/protocol/validatorPrimitives.js +18 -4
- package/lib/remote/playwrightConnection.js +29 -166
- package/lib/remote/playwrightServer.js +233 -35
- package/lib/server/android/android.js +97 -83
- package/lib/server/android/backendAdb.js +0 -2
- package/lib/server/bidi/bidiBrowser.js +139 -73
- package/lib/server/bidi/bidiChromium.js +23 -22
- package/lib/server/bidi/bidiExecutionContext.js +2 -1
- package/lib/server/bidi/bidiFirefox.js +17 -14
- package/lib/server/bidi/bidiInput.js +22 -22
- package/lib/server/bidi/bidiNetworkManager.js +8 -11
- package/lib/server/bidi/bidiPage.js +42 -86
- package/lib/server/bidi/third_party/bidiProtocol.js +5 -133
- package/lib/server/bidi/third_party/bidiProtocolCore.js +179 -0
- package/lib/server/{dispatchers/selectorsDispatcher.js → bidi/third_party/bidiProtocolPermissions.js} +20 -18
- package/lib/server/browser.js +30 -21
- package/lib/server/browserContext.js +203 -165
- package/lib/server/browserType.js +109 -107
- package/lib/server/chromium/chromium.js +84 -69
- package/lib/server/chromium/chromiumSwitches.js +13 -20
- package/lib/server/chromium/crBrowser.js +74 -40
- package/lib/server/chromium/crConnection.js +8 -9
- package/lib/server/chromium/crCoverage.js +11 -8
- package/lib/server/chromium/crDragDrop.js +25 -20
- package/lib/server/chromium/crExecutionContext.js +2 -1
- package/lib/server/chromium/crInput.js +32 -29
- package/lib/server/chromium/crNetworkManager.js +43 -31
- package/lib/server/chromium/crPage.js +98 -72
- package/lib/server/chromium/crServiceWorker.js +13 -18
- package/lib/server/chromium/videoRecorder.js +10 -18
- package/lib/server/clock.js +51 -39
- package/lib/server/codegen/csharp.js +10 -5
- package/lib/server/codegen/java.js +1 -1
- package/lib/server/codegen/javascript.js +1 -1
- package/lib/server/codegen/jsonl.js +2 -1
- package/lib/server/codegen/language.js +22 -1
- package/lib/server/codegen/languages.js +4 -4
- package/lib/server/codegen/python.js +1 -1
- package/lib/server/cookieStore.js +3 -1
- package/lib/server/debugController.js +105 -71
- package/lib/server/debugger.js +6 -23
- package/lib/server/deviceDescriptorsSource.json +237 -127
- package/lib/server/dialog.js +50 -6
- package/lib/server/dispatchers/androidDispatcher.js +77 -62
- package/lib/server/dispatchers/artifactDispatcher.js +18 -18
- package/lib/server/dispatchers/browserContextDispatcher.js +141 -91
- package/lib/server/dispatchers/browserDispatcher.js +55 -88
- package/lib/server/dispatchers/browserTypeDispatcher.js +18 -9
- package/lib/server/dispatchers/cdpSessionDispatcher.js +4 -4
- package/lib/server/dispatchers/debugControllerDispatcher.js +12 -21
- package/lib/server/dispatchers/dialogDispatcher.js +4 -4
- package/lib/server/dispatchers/dispatcher.js +78 -53
- package/lib/server/dispatchers/electronDispatcher.js +19 -20
- package/lib/server/dispatchers/elementHandlerDispatcher.js +83 -93
- package/lib/server/dispatchers/frameDispatcher.js +98 -101
- package/lib/server/dispatchers/jsHandleDispatcher.js +21 -16
- package/lib/server/dispatchers/jsonPipeDispatcher.js +4 -4
- package/lib/server/dispatchers/localUtilsDispatcher.js +53 -59
- package/lib/server/dispatchers/networkDispatchers.js +41 -35
- package/lib/server/dispatchers/pageDispatcher.js +156 -107
- package/lib/server/dispatchers/playwrightDispatcher.js +37 -25
- package/lib/server/dispatchers/streamDispatcher.js +15 -8
- package/lib/server/dispatchers/tracingDispatcher.js +22 -13
- package/lib/server/dispatchers/webSocketRouteDispatcher.js +46 -35
- package/lib/server/dispatchers/writableStreamDispatcher.js +16 -10
- package/lib/server/dom.js +198 -266
- package/lib/server/download.js +3 -3
- package/lib/server/electron/electron.js +96 -103
- package/lib/server/electron/loader.js +1 -1
- package/lib/server/fetch.js +22 -41
- package/lib/server/fileUploadUtils.js +1 -1
- package/lib/server/firefox/ffBrowser.js +79 -55
- package/lib/server/firefox/ffExecutionContext.js +2 -1
- package/lib/server/firefox/ffInput.js +23 -23
- package/lib/server/firefox/ffNetworkManager.js +8 -6
- package/lib/server/firefox/ffPage.js +39 -36
- package/lib/server/firefox/firefox.js +9 -10
- package/lib/server/frameSelectors.js +63 -20
- package/lib/server/frames.js +495 -555
- package/lib/server/har/harRecorder.js +1 -1
- package/lib/server/har/harTracer.js +4 -2
- package/lib/server/helper.js +3 -7
- package/lib/server/index.js +0 -3
- package/lib/server/input.js +47 -54
- package/lib/server/instrumentation.js +8 -14
- package/lib/server/javascript.js +8 -16
- package/lib/server/launchApp.js +48 -30
- package/lib/server/localUtils.js +45 -38
- package/lib/server/network.js +44 -10
- package/lib/server/page.js +232 -177
- package/lib/server/pageBinding.js +6 -7
- package/lib/server/playwright.js +4 -14
- package/lib/server/progress.js +57 -49
- package/lib/server/recorder/recorderApp.js +298 -95
- package/lib/server/recorder/recorderRunner.js +23 -24
- package/lib/server/recorder/recorderSignalProcessor.js +83 -0
- package/lib/server/recorder/recorderUtils.js +67 -10
- package/lib/server/recorder.js +284 -146
- package/lib/server/registry/index.js +83 -48
- package/lib/server/registry/nativeDeps.js +175 -0
- package/lib/server/registry/oopDownloadBrowserMain.js +1 -1
- package/lib/server/screenshotter.js +84 -83
- package/lib/server/selectors.js +12 -12
- package/lib/server/socksClientCertificatesInterceptor.js +198 -136
- package/lib/server/trace/recorder/snapshotter.js +12 -19
- package/lib/server/trace/recorder/tracing.js +36 -27
- package/lib/server/trace/viewer/traceViewer.js +11 -20
- package/lib/server/transport.js +20 -22
- package/lib/server/utils/comparators.js +2 -2
- package/lib/server/utils/debug.js +3 -8
- package/lib/server/utils/debugLogger.js +8 -0
- package/lib/server/utils/hostPlatform.js +3 -1
- package/lib/server/utils/network.js +35 -25
- package/lib/server/utils/nodePlatform.js +1 -1
- package/lib/server/utils/processLauncher.js +4 -1
- package/lib/server/utils/wsServer.js +11 -17
- package/lib/server/webkit/webkit.js +5 -2
- package/lib/server/webkit/wkBrowser.js +51 -28
- package/lib/server/webkit/wkExecutionContext.js +2 -1
- package/lib/server/webkit/wkInput.js +25 -25
- package/lib/server/webkit/wkInterceptableRequest.js +1 -1
- package/lib/server/webkit/wkPage.js +80 -59
- package/lib/server/webkit/wkProvisionalPage.js +1 -1
- package/lib/server/webkit/wkWorkers.js +7 -7
- package/lib/utils/isomorphic/ariaSnapshot.js +13 -7
- package/lib/utils/isomorphic/cssParser.js +1 -2
- package/lib/utils/isomorphic/locatorGenerators.js +18 -0
- package/lib/utils/isomorphic/manualPromise.js +1 -2
- package/lib/utils/isomorphic/mimeType.js +1 -2
- package/lib/utils/isomorphic/multimap.js +1 -2
- package/lib/utils/isomorphic/oldUtilityScriptSerializers.js +248 -0
- package/lib/utils/isomorphic/protocolFormatter.js +78 -0
- package/lib/utils/isomorphic/protocolMetainfo.js +318 -0
- package/lib/utils/isomorphic/selectorParser.js +3 -4
- package/lib/utils/isomorphic/stringUtils.js +3 -24
- package/lib/utils/isomorphic/time.js +9 -4
- package/lib/utils/isomorphic/timeoutRunner.js +3 -4
- package/lib/utils/isomorphic/traceUtils.js +2 -3
- package/lib/utils/isomorphic/urlMatch.js +21 -7
- package/lib/utils/isomorphic/utilityScriptSerializers.js +208 -205
- package/lib/utils.js +8 -2
- package/lib/utilsBundleImpl/index.js +160 -150
- package/lib/vite/htmlReport/index.html +17 -17
- package/lib/vite/recorder/assets/{codeMirrorModule-CXVeovup.js → codeMirrorModule-DzQ0k89p.js} +1 -1
- package/lib/vite/recorder/assets/{index-eHBmevrY.css → index-CI4HQ-Zb.css} +1 -1
- package/lib/vite/recorder/assets/index-D7C7daHH.js +184 -0
- package/lib/vite/recorder/index.html +3 -3
- package/lib/vite/traceViewer/assets/{codeMirrorModule-_GLjJL-7.js → codeMirrorModule-Di48jgWx.js} +1 -1
- package/lib/vite/traceViewer/assets/defaultSettingsView-szBn8781.js +256 -0
- package/lib/vite/traceViewer/defaultSettingsView.DVJHpiGt.css +1 -0
- package/lib/vite/traceViewer/index.BFsek2M6.css +1 -0
- package/lib/vite/traceViewer/index.DQvXoPLL.js +2 -0
- package/lib/vite/traceViewer/index.html +6 -6
- package/lib/vite/traceViewer/sw.bundle.js +3 -3
- package/lib/vite/traceViewer/uiMode.dBV3oN9h.js +5 -0
- package/lib/vite/traceViewer/uiMode.html +4 -4
- package/lib/zipBundleImpl.js +4 -4
- package/package.json +1 -1
- package/types/protocol.d.ts +712 -107
- package/types/types.d.ts +128 -17
- package/lib/generated/consoleApiSource.js +0 -28
- package/lib/protocol/debug.js +0 -211
- package/lib/server/recorder/contextRecorder.js +0 -286
- package/lib/server/recorder/recorderCollection.js +0 -116
- package/lib/server/recorder/recorderFrontend.js +0 -16
- package/lib/server/storageScript.js +0 -154
- package/lib/server/timeoutSettings.js +0 -89
- package/lib/utils/isomorphic/builtins.js +0 -86
- package/lib/vite/recorder/assets/index-BsWQsSGl.js +0 -184
- package/lib/vite/traceViewer/assets/defaultSettingsView-DtCQiGHe.js +0 -265
- package/lib/vite/traceViewer/defaultSettingsView.QdHITyLI.css +0 -1
- package/lib/vite/traceViewer/index.CFOW-Ezb.css +0 -1
- package/lib/vite/traceViewer/index.cFZzK9RN.js +0 -2
- package/lib/vite/traceViewer/uiMode.XVPIqBeS.js +0 -5
|
@@ -22,10 +22,8 @@ __export(elementHandlerDispatcher_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(elementHandlerDispatcher_exports);
|
|
24
24
|
var import_browserContextDispatcher = require("./browserContextDispatcher");
|
|
25
|
-
var import_dispatcher = require("./dispatcher");
|
|
26
25
|
var import_frameDispatcher = require("./frameDispatcher");
|
|
27
26
|
var import_jsHandleDispatcher = require("./jsHandleDispatcher");
|
|
28
|
-
var import_pageDispatcher = require("./pageDispatcher");
|
|
29
27
|
class ElementHandleDispatcher extends import_jsHandleDispatcher.JSHandleDispatcher {
|
|
30
28
|
constructor(scope, elementHandle) {
|
|
31
29
|
super(scope, elementHandle);
|
|
@@ -33,156 +31,148 @@ class ElementHandleDispatcher extends import_jsHandleDispatcher.JSHandleDispatch
|
|
|
33
31
|
this._elementHandle = elementHandle;
|
|
34
32
|
}
|
|
35
33
|
static from(scope, handle) {
|
|
36
|
-
return
|
|
34
|
+
return scope.connection.existingDispatcher(handle) || new ElementHandleDispatcher(scope, handle);
|
|
37
35
|
}
|
|
38
36
|
static fromNullable(scope, handle) {
|
|
39
37
|
if (!handle)
|
|
40
38
|
return void 0;
|
|
41
|
-
return
|
|
39
|
+
return scope.connection.existingDispatcher(handle) || new ElementHandleDispatcher(scope, handle);
|
|
42
40
|
}
|
|
43
|
-
static
|
|
44
|
-
const result =
|
|
41
|
+
static fromJSOrElementHandle(scope, handle) {
|
|
42
|
+
const result = scope.connection.existingDispatcher(handle);
|
|
45
43
|
if (result)
|
|
46
44
|
return result;
|
|
47
|
-
|
|
45
|
+
const elementHandle = handle.asElement();
|
|
46
|
+
if (!elementHandle)
|
|
47
|
+
return new import_jsHandleDispatcher.JSHandleDispatcher(scope, handle);
|
|
48
|
+
return new ElementHandleDispatcher(scope, elementHandle);
|
|
48
49
|
}
|
|
49
|
-
async ownerFrame(params,
|
|
50
|
+
async ownerFrame(params, progress) {
|
|
50
51
|
const frame = await this._elementHandle.ownerFrame();
|
|
51
52
|
return { frame: frame ? import_frameDispatcher.FrameDispatcher.from(this._browserContextDispatcher(), frame) : void 0 };
|
|
52
53
|
}
|
|
53
|
-
async contentFrame(params,
|
|
54
|
-
const frame = await this._elementHandle.contentFrame();
|
|
54
|
+
async contentFrame(params, progress) {
|
|
55
|
+
const frame = await progress.race(this._elementHandle.contentFrame());
|
|
55
56
|
return { frame: frame ? import_frameDispatcher.FrameDispatcher.from(this._browserContextDispatcher(), frame) : void 0 };
|
|
56
57
|
}
|
|
57
|
-
async
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
async getAttribute(params, metadata) {
|
|
61
|
-
const value = await this._elementHandle.getAttribute(metadata, params.name);
|
|
58
|
+
async getAttribute(params, progress) {
|
|
59
|
+
const value = await this._elementHandle.getAttribute(progress, params.name);
|
|
62
60
|
return { value: value === null ? void 0 : value };
|
|
63
61
|
}
|
|
64
|
-
async inputValue(params,
|
|
65
|
-
const value = await this._elementHandle.inputValue(
|
|
62
|
+
async inputValue(params, progress) {
|
|
63
|
+
const value = await this._elementHandle.inputValue(progress);
|
|
66
64
|
return { value };
|
|
67
65
|
}
|
|
68
|
-
async textContent(params,
|
|
69
|
-
const value = await this._elementHandle.textContent(
|
|
66
|
+
async textContent(params, progress) {
|
|
67
|
+
const value = await this._elementHandle.textContent(progress);
|
|
70
68
|
return { value: value === null ? void 0 : value };
|
|
71
69
|
}
|
|
72
|
-
async innerText(params,
|
|
73
|
-
return { value: await this._elementHandle.innerText(
|
|
70
|
+
async innerText(params, progress) {
|
|
71
|
+
return { value: await this._elementHandle.innerText(progress) };
|
|
74
72
|
}
|
|
75
|
-
async innerHTML(params,
|
|
76
|
-
return { value: await this._elementHandle.innerHTML(
|
|
73
|
+
async innerHTML(params, progress) {
|
|
74
|
+
return { value: await this._elementHandle.innerHTML(progress) };
|
|
77
75
|
}
|
|
78
|
-
async isChecked(params,
|
|
79
|
-
return { value: await this._elementHandle.isChecked(
|
|
76
|
+
async isChecked(params, progress) {
|
|
77
|
+
return { value: await this._elementHandle.isChecked(progress) };
|
|
80
78
|
}
|
|
81
|
-
async isDisabled(params,
|
|
82
|
-
return { value: await this._elementHandle.isDisabled(
|
|
79
|
+
async isDisabled(params, progress) {
|
|
80
|
+
return { value: await this._elementHandle.isDisabled(progress) };
|
|
83
81
|
}
|
|
84
|
-
async isEditable(params,
|
|
85
|
-
return { value: await this._elementHandle.isEditable(
|
|
82
|
+
async isEditable(params, progress) {
|
|
83
|
+
return { value: await this._elementHandle.isEditable(progress) };
|
|
86
84
|
}
|
|
87
|
-
async isEnabled(params,
|
|
88
|
-
return { value: await this._elementHandle.isEnabled(
|
|
85
|
+
async isEnabled(params, progress) {
|
|
86
|
+
return { value: await this._elementHandle.isEnabled(progress) };
|
|
89
87
|
}
|
|
90
|
-
async isHidden(params,
|
|
91
|
-
return { value: await this._elementHandle.isHidden(
|
|
88
|
+
async isHidden(params, progress) {
|
|
89
|
+
return { value: await this._elementHandle.isHidden(progress) };
|
|
92
90
|
}
|
|
93
|
-
async isVisible(params,
|
|
94
|
-
return { value: await this._elementHandle.isVisible(
|
|
91
|
+
async isVisible(params, progress) {
|
|
92
|
+
return { value: await this._elementHandle.isVisible(progress) };
|
|
95
93
|
}
|
|
96
|
-
async dispatchEvent(params,
|
|
97
|
-
await this._elementHandle.dispatchEvent(
|
|
94
|
+
async dispatchEvent(params, progress) {
|
|
95
|
+
await this._elementHandle.dispatchEvent(progress, params.type, (0, import_jsHandleDispatcher.parseArgument)(params.eventInit));
|
|
98
96
|
}
|
|
99
|
-
async scrollIntoViewIfNeeded(params,
|
|
100
|
-
await this._elementHandle.scrollIntoViewIfNeeded(
|
|
97
|
+
async scrollIntoViewIfNeeded(params, progress) {
|
|
98
|
+
await this._elementHandle.scrollIntoViewIfNeeded(progress);
|
|
101
99
|
}
|
|
102
|
-
async hover(params,
|
|
103
|
-
return await this._elementHandle.hover(
|
|
100
|
+
async hover(params, progress) {
|
|
101
|
+
return await this._elementHandle.hover(progress, params);
|
|
104
102
|
}
|
|
105
|
-
async click(params,
|
|
106
|
-
return await this._elementHandle.click(
|
|
103
|
+
async click(params, progress) {
|
|
104
|
+
return await this._elementHandle.click(progress, params);
|
|
107
105
|
}
|
|
108
|
-
async dblclick(params,
|
|
109
|
-
return await this._elementHandle.dblclick(
|
|
106
|
+
async dblclick(params, progress) {
|
|
107
|
+
return await this._elementHandle.dblclick(progress, params);
|
|
110
108
|
}
|
|
111
|
-
async tap(params,
|
|
112
|
-
return await this._elementHandle.tap(
|
|
109
|
+
async tap(params, progress) {
|
|
110
|
+
return await this._elementHandle.tap(progress, params);
|
|
113
111
|
}
|
|
114
|
-
async selectOption(params,
|
|
112
|
+
async selectOption(params, progress) {
|
|
115
113
|
const elements = (params.elements || []).map((e) => e._elementHandle);
|
|
116
|
-
return { values: await this._elementHandle.selectOption(
|
|
114
|
+
return { values: await this._elementHandle.selectOption(progress, elements, params.options || [], params) };
|
|
117
115
|
}
|
|
118
|
-
async fill(params,
|
|
119
|
-
return await this._elementHandle.fill(
|
|
116
|
+
async fill(params, progress) {
|
|
117
|
+
return await this._elementHandle.fill(progress, params.value, params);
|
|
120
118
|
}
|
|
121
|
-
async selectText(params,
|
|
122
|
-
await this._elementHandle.selectText(
|
|
119
|
+
async selectText(params, progress) {
|
|
120
|
+
await this._elementHandle.selectText(progress, params);
|
|
123
121
|
}
|
|
124
|
-
async setInputFiles(params,
|
|
125
|
-
return await this._elementHandle.setInputFiles(
|
|
122
|
+
async setInputFiles(params, progress) {
|
|
123
|
+
return await this._elementHandle.setInputFiles(progress, params);
|
|
126
124
|
}
|
|
127
|
-
async focus(params,
|
|
128
|
-
await this._elementHandle.focus(
|
|
125
|
+
async focus(params, progress) {
|
|
126
|
+
await this._elementHandle.focus(progress);
|
|
129
127
|
}
|
|
130
|
-
async type(params,
|
|
131
|
-
return await this._elementHandle.type(
|
|
128
|
+
async type(params, progress) {
|
|
129
|
+
return await this._elementHandle.type(progress, params.text, params);
|
|
132
130
|
}
|
|
133
|
-
async press(params,
|
|
134
|
-
return await this._elementHandle.press(
|
|
131
|
+
async press(params, progress) {
|
|
132
|
+
return await this._elementHandle.press(progress, params.key, params);
|
|
135
133
|
}
|
|
136
|
-
async check(params,
|
|
137
|
-
return await this._elementHandle.check(
|
|
134
|
+
async check(params, progress) {
|
|
135
|
+
return await this._elementHandle.check(progress, params);
|
|
138
136
|
}
|
|
139
|
-
async uncheck(params,
|
|
140
|
-
return await this._elementHandle.uncheck(
|
|
137
|
+
async uncheck(params, progress) {
|
|
138
|
+
return await this._elementHandle.uncheck(progress, params);
|
|
141
139
|
}
|
|
142
|
-
async boundingBox(params,
|
|
143
|
-
const value = await this._elementHandle.boundingBox();
|
|
140
|
+
async boundingBox(params, progress) {
|
|
141
|
+
const value = await progress.race(this._elementHandle.boundingBox());
|
|
144
142
|
return { value: value || void 0 };
|
|
145
143
|
}
|
|
146
|
-
async screenshot(params,
|
|
144
|
+
async screenshot(params, progress) {
|
|
147
145
|
const mask = (params.mask || []).map(({ frame, selector }) => ({
|
|
148
146
|
frame: frame._object,
|
|
149
147
|
selector
|
|
150
148
|
}));
|
|
151
|
-
return { binary: await this._elementHandle.screenshot(
|
|
149
|
+
return { binary: await this._elementHandle.screenshot(progress, { ...params, mask }) };
|
|
152
150
|
}
|
|
153
|
-
async querySelector(params,
|
|
154
|
-
const handle = await this._elementHandle.querySelector(params.selector, params);
|
|
151
|
+
async querySelector(params, progress) {
|
|
152
|
+
const handle = await progress.race(this._elementHandle.querySelector(params.selector, params));
|
|
155
153
|
return { element: ElementHandleDispatcher.fromNullable(this.parentScope(), handle) };
|
|
156
154
|
}
|
|
157
|
-
async querySelectorAll(params,
|
|
158
|
-
const elements = await this._elementHandle.querySelectorAll(params.selector);
|
|
155
|
+
async querySelectorAll(params, progress) {
|
|
156
|
+
const elements = await progress.race(this._elementHandle.querySelectorAll(params.selector));
|
|
159
157
|
return { elements: elements.map((e) => ElementHandleDispatcher.from(this.parentScope(), e)) };
|
|
160
158
|
}
|
|
161
|
-
async evalOnSelector(params,
|
|
162
|
-
return { value: (0, import_jsHandleDispatcher.serializeResult)(await this._elementHandle.evalOnSelector(params.selector, !!params.strict, params.expression, params.isFunction, (0, import_jsHandleDispatcher.parseArgument)(params.arg))) };
|
|
159
|
+
async evalOnSelector(params, progress) {
|
|
160
|
+
return { value: (0, import_jsHandleDispatcher.serializeResult)(await progress.race(this._elementHandle.evalOnSelector(params.selector, !!params.strict, params.expression, params.isFunction, (0, import_jsHandleDispatcher.parseArgument)(params.arg)))) };
|
|
163
161
|
}
|
|
164
|
-
async evalOnSelectorAll(params,
|
|
165
|
-
return { value: (0, import_jsHandleDispatcher.serializeResult)(await this._elementHandle.evalOnSelectorAll(params.selector, params.expression, params.isFunction, (0, import_jsHandleDispatcher.parseArgument)(params.arg))) };
|
|
162
|
+
async evalOnSelectorAll(params, progress) {
|
|
163
|
+
return { value: (0, import_jsHandleDispatcher.serializeResult)(await progress.race(this._elementHandle.evalOnSelectorAll(params.selector, params.expression, params.isFunction, (0, import_jsHandleDispatcher.parseArgument)(params.arg)))) };
|
|
166
164
|
}
|
|
167
|
-
async waitForElementState(params,
|
|
168
|
-
await this._elementHandle.waitForElementState(
|
|
165
|
+
async waitForElementState(params, progress) {
|
|
166
|
+
await this._elementHandle.waitForElementState(progress, params.state);
|
|
169
167
|
}
|
|
170
|
-
async waitForSelector(params,
|
|
171
|
-
return { element: ElementHandleDispatcher.fromNullable(this.parentScope(), await this._elementHandle.waitForSelector(
|
|
168
|
+
async waitForSelector(params, progress) {
|
|
169
|
+
return { element: ElementHandleDispatcher.fromNullable(this.parentScope(), await this._elementHandle.waitForSelector(progress, params.selector, params)) };
|
|
172
170
|
}
|
|
173
171
|
_browserContextDispatcher() {
|
|
174
|
-
const
|
|
175
|
-
if (
|
|
176
|
-
return
|
|
177
|
-
|
|
178
|
-
return scope.parentScope();
|
|
179
|
-
if (scope instanceof import_pageDispatcher.WorkerDispatcher || scope instanceof import_frameDispatcher.FrameDispatcher) {
|
|
180
|
-
const parentScope = scope.parentScope();
|
|
181
|
-
if (parentScope instanceof import_browserContextDispatcher.BrowserContextDispatcher)
|
|
182
|
-
return parentScope;
|
|
183
|
-
return parentScope.parentScope();
|
|
184
|
-
}
|
|
185
|
-
throw new Error("ElementHandle belongs to unexpected scope");
|
|
172
|
+
const parentScope = this.parentScope().parentScope();
|
|
173
|
+
if (parentScope instanceof import_browserContextDispatcher.BrowserContextDispatcher)
|
|
174
|
+
return parentScope;
|
|
175
|
+
return parentScope.parentScope();
|
|
186
176
|
}
|
|
187
177
|
}
|
|
188
178
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -32,7 +32,7 @@ var import_utilsBundle = require("../../utilsBundle");
|
|
|
32
32
|
class FrameDispatcher extends import_dispatcher.Dispatcher {
|
|
33
33
|
constructor(scope, frame) {
|
|
34
34
|
const gcBucket = frame._page.mainFrame() === frame ? "MainFrame" : "Frame";
|
|
35
|
-
const pageDispatcher =
|
|
35
|
+
const pageDispatcher = scope.connection.existingDispatcher(frame._page);
|
|
36
36
|
super(pageDispatcher || scope, frame, "Frame", {
|
|
37
37
|
url: frame.url(),
|
|
38
38
|
name: frame.name(),
|
|
@@ -58,7 +58,7 @@ class FrameDispatcher extends import_dispatcher.Dispatcher {
|
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
static from(scope, frame) {
|
|
61
|
-
const result =
|
|
61
|
+
const result = scope.connection.existingDispatcher(frame);
|
|
62
62
|
return result || new FrameDispatcher(scope, frame);
|
|
63
63
|
}
|
|
64
64
|
static fromNullable(scope, frame) {
|
|
@@ -66,162 +66,159 @@ class FrameDispatcher extends import_dispatcher.Dispatcher {
|
|
|
66
66
|
return;
|
|
67
67
|
return FrameDispatcher.from(scope, frame);
|
|
68
68
|
}
|
|
69
|
-
async goto(params,
|
|
70
|
-
return { response: import_networkDispatchers.ResponseDispatcher.fromNullable(this._browserContextDispatcher, await this._frame.goto(
|
|
69
|
+
async goto(params, progress) {
|
|
70
|
+
return { response: import_networkDispatchers.ResponseDispatcher.fromNullable(this._browserContextDispatcher, await this._frame.goto(progress, params.url, params)) };
|
|
71
71
|
}
|
|
72
|
-
async frameElement() {
|
|
73
|
-
return { element: import_elementHandlerDispatcher.ElementHandleDispatcher.from(this, await this._frame.frameElement()) };
|
|
72
|
+
async frameElement(params, progress) {
|
|
73
|
+
return { element: import_elementHandlerDispatcher.ElementHandleDispatcher.from(this, await progress.race(this._frame.frameElement())) };
|
|
74
74
|
}
|
|
75
|
-
async evaluateExpression(params,
|
|
76
|
-
return { value: (0, import_jsHandleDispatcher.serializeResult)(await this._frame.evaluateExpression(params.expression, {
|
|
77
|
-
isFunction: params.isFunction,
|
|
78
|
-
world: params.isolatedContext ? "utility" : "main"
|
|
79
|
-
}, (0, import_jsHandleDispatcher.parseArgument)(params.arg))) };
|
|
75
|
+
async evaluateExpression(params, progress) {
|
|
76
|
+
return { value: (0, import_jsHandleDispatcher.serializeResult)(await progress.race(this._frame.evaluateExpression(params.expression, { isFunction: params.isFunction, world: params.isolatedContext ? "utility" : "main" }, (0, import_jsHandleDispatcher.parseArgument)(params.arg)))) };
|
|
80
77
|
}
|
|
81
|
-
async evaluateExpressionHandle(params,
|
|
82
|
-
return { handle: import_elementHandlerDispatcher.ElementHandleDispatcher.
|
|
83
|
-
isFunction: params.isFunction,
|
|
84
|
-
world: params.isolatedContext ? "utility" : "main"
|
|
85
|
-
}, (0, import_jsHandleDispatcher.parseArgument)(params.arg))) };
|
|
78
|
+
async evaluateExpressionHandle(params, progress) {
|
|
79
|
+
return { handle: import_elementHandlerDispatcher.ElementHandleDispatcher.fromJSOrElementHandle(this, await progress.race(this._frame.evaluateExpressionHandle(params.expression, { isFunction: params.isFunction, world: params.isolatedContext ? "utility" : "main" }, (0, import_jsHandleDispatcher.parseArgument)(params.arg)))) };
|
|
86
80
|
}
|
|
87
|
-
async waitForSelector(params,
|
|
88
|
-
return { element: import_elementHandlerDispatcher.ElementHandleDispatcher.fromNullable(this, await this._frame.waitForSelector(
|
|
81
|
+
async waitForSelector(params, progress) {
|
|
82
|
+
return { element: import_elementHandlerDispatcher.ElementHandleDispatcher.fromNullable(this, await this._frame.waitForSelector(progress, params.selector, true, params)) };
|
|
89
83
|
}
|
|
90
|
-
async dispatchEvent(params,
|
|
91
|
-
return this._frame.dispatchEvent(
|
|
84
|
+
async dispatchEvent(params, progress) {
|
|
85
|
+
return this._frame.dispatchEvent(progress, params.selector, params.type, (0, import_jsHandleDispatcher.parseArgument)(params.eventInit), params);
|
|
92
86
|
}
|
|
93
|
-
async evalOnSelector(params,
|
|
94
|
-
return { value: (0, import_jsHandleDispatcher.serializeResult)(await this._frame.evalOnSelector(params.selector, !!params.strict, params.expression, params.isFunction, (0, import_jsHandleDispatcher.parseArgument)(params.arg))) };
|
|
87
|
+
async evalOnSelector(params, progress) {
|
|
88
|
+
return { value: (0, import_jsHandleDispatcher.serializeResult)(await progress.race(this._frame.evalOnSelector(params.selector, !!params.strict, params.expression, params.isFunction, (0, import_jsHandleDispatcher.parseArgument)(params.arg)))) };
|
|
95
89
|
}
|
|
96
|
-
async evalOnSelectorAll(params,
|
|
90
|
+
async evalOnSelectorAll(params, progress) {
|
|
97
91
|
return { value: (0, import_jsHandleDispatcher.serializeResult)(await this._frame.evalOnSelectorAll(params.selector, params.expression, params.isFunction, (0, import_jsHandleDispatcher.parseArgument)(params.arg), null, params.isolatedContext)) };
|
|
98
92
|
}
|
|
99
|
-
async querySelector(params,
|
|
100
|
-
return { element: import_elementHandlerDispatcher.ElementHandleDispatcher.fromNullable(this, await this._frame.querySelector(params.selector, params)) };
|
|
93
|
+
async querySelector(params, progress) {
|
|
94
|
+
return { element: import_elementHandlerDispatcher.ElementHandleDispatcher.fromNullable(this, await progress.race(this._frame.querySelector(params.selector, params))) };
|
|
101
95
|
}
|
|
102
|
-
async querySelectorAll(params,
|
|
103
|
-
const elements = await this._frame.querySelectorAll(params.selector);
|
|
96
|
+
async querySelectorAll(params, progress) {
|
|
97
|
+
const elements = await progress.race(this._frame.querySelectorAll(params.selector));
|
|
104
98
|
return { elements: elements.map((e) => import_elementHandlerDispatcher.ElementHandleDispatcher.from(this, e)) };
|
|
105
99
|
}
|
|
106
|
-
async queryCount(params) {
|
|
107
|
-
return { value: await this._frame.queryCount(params.selector) };
|
|
100
|
+
async queryCount(params, progress) {
|
|
101
|
+
return { value: await progress.race(this._frame.queryCount(params.selector, params)) };
|
|
108
102
|
}
|
|
109
|
-
async content() {
|
|
110
|
-
return { value: await this._frame.content() };
|
|
103
|
+
async content(params, progress) {
|
|
104
|
+
return { value: await progress.race(this._frame.content()) };
|
|
111
105
|
}
|
|
112
|
-
async setContent(params,
|
|
113
|
-
return await this._frame.setContent(
|
|
106
|
+
async setContent(params, progress) {
|
|
107
|
+
return await this._frame.setContent(progress, params.html, params);
|
|
114
108
|
}
|
|
115
|
-
async addScriptTag(params,
|
|
116
|
-
return { element: import_elementHandlerDispatcher.ElementHandleDispatcher.from(this, await this._frame.addScriptTag(params)) };
|
|
109
|
+
async addScriptTag(params, progress) {
|
|
110
|
+
return { element: import_elementHandlerDispatcher.ElementHandleDispatcher.from(this, await progress.race(this._frame.addScriptTag(params))) };
|
|
117
111
|
}
|
|
118
|
-
async addStyleTag(params,
|
|
119
|
-
return { element: import_elementHandlerDispatcher.ElementHandleDispatcher.from(this, await this._frame.addStyleTag(params)) };
|
|
112
|
+
async addStyleTag(params, progress) {
|
|
113
|
+
return { element: import_elementHandlerDispatcher.ElementHandleDispatcher.from(this, await progress.race(this._frame.addStyleTag(params))) };
|
|
120
114
|
}
|
|
121
|
-
async click(params,
|
|
122
|
-
metadata.potentiallyClosesScope = true;
|
|
123
|
-
return await this._frame.click(
|
|
115
|
+
async click(params, progress) {
|
|
116
|
+
progress.metadata.potentiallyClosesScope = true;
|
|
117
|
+
return await this._frame.click(progress, params.selector, params);
|
|
124
118
|
}
|
|
125
|
-
async dblclick(params,
|
|
126
|
-
return await this._frame.dblclick(
|
|
119
|
+
async dblclick(params, progress) {
|
|
120
|
+
return await this._frame.dblclick(progress, params.selector, params);
|
|
127
121
|
}
|
|
128
|
-
async dragAndDrop(params,
|
|
129
|
-
return await this._frame.dragAndDrop(
|
|
122
|
+
async dragAndDrop(params, progress) {
|
|
123
|
+
return await this._frame.dragAndDrop(progress, params.source, params.target, params);
|
|
130
124
|
}
|
|
131
|
-
async tap(params,
|
|
132
|
-
return await this._frame.tap(
|
|
125
|
+
async tap(params, progress) {
|
|
126
|
+
return await this._frame.tap(progress, params.selector, params);
|
|
133
127
|
}
|
|
134
|
-
async fill(params,
|
|
135
|
-
return await this._frame.fill(
|
|
128
|
+
async fill(params, progress) {
|
|
129
|
+
return await this._frame.fill(progress, params.selector, params.value, params);
|
|
136
130
|
}
|
|
137
|
-
async focus(params,
|
|
138
|
-
await this._frame.focus(
|
|
131
|
+
async focus(params, progress) {
|
|
132
|
+
await this._frame.focus(progress, params.selector, params);
|
|
139
133
|
}
|
|
140
|
-
async blur(params,
|
|
141
|
-
await this._frame.blur(
|
|
134
|
+
async blur(params, progress) {
|
|
135
|
+
await this._frame.blur(progress, params.selector, params);
|
|
142
136
|
}
|
|
143
|
-
async textContent(params,
|
|
144
|
-
const value = await this._frame.textContent(
|
|
137
|
+
async textContent(params, progress) {
|
|
138
|
+
const value = await this._frame.textContent(progress, params.selector, params);
|
|
145
139
|
return { value: value === null ? void 0 : value };
|
|
146
140
|
}
|
|
147
|
-
async innerText(params,
|
|
148
|
-
return { value: await this._frame.innerText(
|
|
141
|
+
async innerText(params, progress) {
|
|
142
|
+
return { value: await this._frame.innerText(progress, params.selector, params) };
|
|
149
143
|
}
|
|
150
|
-
async innerHTML(params,
|
|
151
|
-
return { value: await this._frame.innerHTML(
|
|
144
|
+
async innerHTML(params, progress) {
|
|
145
|
+
return { value: await this._frame.innerHTML(progress, params.selector, params) };
|
|
152
146
|
}
|
|
153
|
-
async
|
|
154
|
-
|
|
147
|
+
async resolveSelector(params, progress) {
|
|
148
|
+
return await this._frame.resolveSelector(progress, params.selector);
|
|
149
|
+
}
|
|
150
|
+
async getAttribute(params, progress) {
|
|
151
|
+
const value = await this._frame.getAttribute(progress, params.selector, params.name, params);
|
|
155
152
|
return { value: value === null ? void 0 : value };
|
|
156
153
|
}
|
|
157
|
-
async inputValue(params,
|
|
158
|
-
const value = await this._frame.inputValue(
|
|
154
|
+
async inputValue(params, progress) {
|
|
155
|
+
const value = await this._frame.inputValue(progress, params.selector, params);
|
|
159
156
|
return { value };
|
|
160
157
|
}
|
|
161
|
-
async isChecked(params,
|
|
162
|
-
return { value: await this._frame.isChecked(
|
|
158
|
+
async isChecked(params, progress) {
|
|
159
|
+
return { value: await this._frame.isChecked(progress, params.selector, params) };
|
|
163
160
|
}
|
|
164
|
-
async isDisabled(params,
|
|
165
|
-
return { value: await this._frame.isDisabled(
|
|
161
|
+
async isDisabled(params, progress) {
|
|
162
|
+
return { value: await this._frame.isDisabled(progress, params.selector, params) };
|
|
166
163
|
}
|
|
167
|
-
async isEditable(params,
|
|
168
|
-
return { value: await this._frame.isEditable(
|
|
164
|
+
async isEditable(params, progress) {
|
|
165
|
+
return { value: await this._frame.isEditable(progress, params.selector, params) };
|
|
169
166
|
}
|
|
170
|
-
async isEnabled(params,
|
|
171
|
-
return { value: await this._frame.isEnabled(
|
|
167
|
+
async isEnabled(params, progress) {
|
|
168
|
+
return { value: await this._frame.isEnabled(progress, params.selector, params) };
|
|
172
169
|
}
|
|
173
|
-
async isHidden(params,
|
|
174
|
-
return { value: await this._frame.isHidden(
|
|
170
|
+
async isHidden(params, progress) {
|
|
171
|
+
return { value: await this._frame.isHidden(progress, params.selector, params) };
|
|
175
172
|
}
|
|
176
|
-
async isVisible(params,
|
|
177
|
-
return { value: await this._frame.isVisible(
|
|
173
|
+
async isVisible(params, progress) {
|
|
174
|
+
return { value: await this._frame.isVisible(progress, params.selector, params) };
|
|
178
175
|
}
|
|
179
|
-
async hover(params,
|
|
180
|
-
return await this._frame.hover(
|
|
176
|
+
async hover(params, progress) {
|
|
177
|
+
return await this._frame.hover(progress, params.selector, params);
|
|
181
178
|
}
|
|
182
|
-
async selectOption(params,
|
|
179
|
+
async selectOption(params, progress) {
|
|
183
180
|
const elements = (params.elements || []).map((e) => e._elementHandle);
|
|
184
|
-
return { values: await this._frame.selectOption(
|
|
181
|
+
return { values: await this._frame.selectOption(progress, params.selector, elements, params.options || [], params) };
|
|
185
182
|
}
|
|
186
|
-
async setInputFiles(params,
|
|
187
|
-
return await this._frame.setInputFiles(
|
|
183
|
+
async setInputFiles(params, progress) {
|
|
184
|
+
return await this._frame.setInputFiles(progress, params.selector, params);
|
|
188
185
|
}
|
|
189
|
-
async type(params,
|
|
190
|
-
return await this._frame.type(
|
|
186
|
+
async type(params, progress) {
|
|
187
|
+
return await this._frame.type(progress, params.selector, params.text, params);
|
|
191
188
|
}
|
|
192
|
-
async press(params,
|
|
193
|
-
return await this._frame.press(
|
|
189
|
+
async press(params, progress) {
|
|
190
|
+
return await this._frame.press(progress, params.selector, params.key, params);
|
|
194
191
|
}
|
|
195
|
-
async check(params,
|
|
196
|
-
return await this._frame.check(
|
|
192
|
+
async check(params, progress) {
|
|
193
|
+
return await this._frame.check(progress, params.selector, params);
|
|
197
194
|
}
|
|
198
|
-
async uncheck(params,
|
|
199
|
-
return await this._frame.uncheck(
|
|
195
|
+
async uncheck(params, progress) {
|
|
196
|
+
return await this._frame.uncheck(progress, params.selector, params);
|
|
200
197
|
}
|
|
201
|
-
async waitForTimeout(params,
|
|
202
|
-
return await this._frame.waitForTimeout(
|
|
198
|
+
async waitForTimeout(params, progress) {
|
|
199
|
+
return await this._frame.waitForTimeout(progress, params.waitTimeout);
|
|
203
200
|
}
|
|
204
|
-
async waitForFunction(params,
|
|
205
|
-
return { handle: import_elementHandlerDispatcher.ElementHandleDispatcher.
|
|
201
|
+
async waitForFunction(params, progress) {
|
|
202
|
+
return { handle: import_elementHandlerDispatcher.ElementHandleDispatcher.fromJSOrElementHandle(this, await this._frame.waitForFunctionExpression(progress, params.expression, params.isFunction, (0, import_jsHandleDispatcher.parseArgument)(params.arg), params)) };
|
|
206
203
|
}
|
|
207
|
-
async title(params,
|
|
208
|
-
return { value: await this._frame.title() };
|
|
204
|
+
async title(params, progress) {
|
|
205
|
+
return { value: await progress.race(this._frame.title()) };
|
|
209
206
|
}
|
|
210
|
-
async highlight(params,
|
|
211
|
-
return await this._frame.highlight(params.selector);
|
|
207
|
+
async highlight(params, progress) {
|
|
208
|
+
return await this._frame.highlight(progress, params.selector);
|
|
212
209
|
}
|
|
213
|
-
async expect(params,
|
|
214
|
-
metadata.potentiallyClosesScope = true;
|
|
210
|
+
async expect(params, progress) {
|
|
211
|
+
progress.metadata.potentiallyClosesScope = true;
|
|
215
212
|
let expectedValue = params.expectedValue ? (0, import_jsHandleDispatcher.parseArgument)(params.expectedValue) : void 0;
|
|
216
213
|
if (params.expression === "to.match.aria" && expectedValue)
|
|
217
214
|
expectedValue = (0, import_ariaSnapshot.parseAriaSnapshotUnsafe)(import_utilsBundle.yaml, expectedValue);
|
|
218
|
-
const result = await this._frame.expect(
|
|
215
|
+
const result = await this._frame.expect(progress, params.selector, { ...params, expectedValue }, params.timeout);
|
|
219
216
|
if (result.received !== void 0)
|
|
220
217
|
result.received = (0, import_jsHandleDispatcher.serializeResult)(result.received);
|
|
221
218
|
return result;
|
|
222
219
|
}
|
|
223
|
-
async ariaSnapshot(params,
|
|
224
|
-
return { snapshot: await this._frame.ariaSnapshot(
|
|
220
|
+
async ariaSnapshot(params, progress) {
|
|
221
|
+
return { snapshot: await this._frame.ariaSnapshot(progress, params.selector) };
|
|
225
222
|
}
|
|
226
223
|
}
|
|
227
224
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -35,29 +35,34 @@ class JSHandleDispatcher extends import_dispatcher.Dispatcher {
|
|
|
35
35
|
this._type_JSHandle = true;
|
|
36
36
|
jsHandle._setPreviewCallback((preview) => this._dispatchEvent("previewUpdated", { preview }));
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
return
|
|
38
|
+
static fromJSHandle(scope, handle) {
|
|
39
|
+
return scope.connection.existingDispatcher(handle) || new JSHandleDispatcher(scope, handle);
|
|
40
40
|
}
|
|
41
|
-
async
|
|
42
|
-
const jsHandle = await this._object.
|
|
43
|
-
return {
|
|
41
|
+
async evaluateExpression(params, progress) {
|
|
42
|
+
const jsHandle = await progress.race(this._object.evaluateExpression(params.expression, { isFunction: params.isFunction }, parseArgument(params.arg)));
|
|
43
|
+
return { value: serializeResult(jsHandle) };
|
|
44
44
|
}
|
|
45
|
-
async
|
|
46
|
-
const jsHandle = await this._object.
|
|
47
|
-
return { handle: import_elementHandlerDispatcher.ElementHandleDispatcher.
|
|
45
|
+
async evaluateExpressionHandle(params, progress) {
|
|
46
|
+
const jsHandle = await progress.race(this._object.evaluateExpressionHandle(params.expression, { isFunction: params.isFunction }, parseArgument(params.arg)));
|
|
47
|
+
return { handle: import_elementHandlerDispatcher.ElementHandleDispatcher.fromJSOrElementHandle(this.parentScope(), jsHandle) };
|
|
48
48
|
}
|
|
49
|
-
async
|
|
50
|
-
const
|
|
49
|
+
async getProperty(params, progress) {
|
|
50
|
+
const jsHandle = await progress.race(this._object.getProperty(params.name));
|
|
51
|
+
return { handle: import_elementHandlerDispatcher.ElementHandleDispatcher.fromJSOrElementHandle(this.parentScope(), jsHandle) };
|
|
52
|
+
}
|
|
53
|
+
async getPropertyList(params, progress) {
|
|
54
|
+
const map = await progress.race(this._object.getProperties());
|
|
51
55
|
const properties = [];
|
|
52
|
-
for (const [name, value] of map)
|
|
53
|
-
properties.push({ name, value: import_elementHandlerDispatcher.ElementHandleDispatcher.
|
|
56
|
+
for (const [name, value] of map) {
|
|
57
|
+
properties.push({ name, value: import_elementHandlerDispatcher.ElementHandleDispatcher.fromJSOrElementHandle(this.parentScope(), value) });
|
|
58
|
+
}
|
|
54
59
|
return { properties };
|
|
55
60
|
}
|
|
56
|
-
async jsonValue() {
|
|
57
|
-
return { value: serializeResult(await this._object.jsonValue()) };
|
|
61
|
+
async jsonValue(params, progress) {
|
|
62
|
+
return { value: serializeResult(await progress.race(this._object.jsonValue())) };
|
|
58
63
|
}
|
|
59
|
-
async dispose(_,
|
|
60
|
-
metadata.potentiallyClosesScope = true;
|
|
64
|
+
async dispose(_, progress) {
|
|
65
|
+
progress.metadata.potentiallyClosesScope = true;
|
|
61
66
|
this._object.dispose();
|
|
62
67
|
this._dispose();
|
|
63
68
|
}
|
|
@@ -22,16 +22,16 @@ __export(jsonPipeDispatcher_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(jsonPipeDispatcher_exports);
|
|
24
24
|
var import_dispatcher = require("./dispatcher");
|
|
25
|
-
var
|
|
25
|
+
var import_instrumentation = require("../instrumentation");
|
|
26
26
|
class JsonPipeDispatcher extends import_dispatcher.Dispatcher {
|
|
27
27
|
constructor(scope) {
|
|
28
|
-
super(scope,
|
|
28
|
+
super(scope, new import_instrumentation.SdkObject(scope._object, "jsonPipe"), "JsonPipe", {});
|
|
29
29
|
this._type_JsonPipe = true;
|
|
30
30
|
}
|
|
31
|
-
async send(params) {
|
|
31
|
+
async send(params, progress) {
|
|
32
32
|
this.emit("message", params.message);
|
|
33
33
|
}
|
|
34
|
-
async close() {
|
|
34
|
+
async close(params, progress) {
|
|
35
35
|
this.emit("close");
|
|
36
36
|
if (!this._disposed) {
|
|
37
37
|
this._dispatchEvent("closed", {});
|