rebrowser-playwright-core 1.52.0 → 1.64.100
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 +7 -1554
- package/bin/install_webkit_wsl.ps1 +33 -0
- package/bin/reinstall_chrome_beta_linux.sh +1 -1
- package/bin/reinstall_chrome_beta_mac.sh +1 -1
- package/bin/reinstall_chrome_stable_linux.sh +1 -1
- package/bin/reinstall_chrome_stable_mac.sh +1 -1
- package/bin/reinstall_msedge_beta_linux.sh +1 -1
- package/bin/reinstall_msedge_beta_mac.sh +1 -1
- package/bin/reinstall_msedge_dev_linux.sh +1 -1
- package/bin/reinstall_msedge_dev_mac.sh +1 -1
- package/bin/reinstall_msedge_stable_linux.sh +1 -1
- package/bin/reinstall_msedge_stable_mac.sh +1 -1
- package/browsers.json +16 -44
- package/cli.js +5 -1
- package/index.js +2 -17
- package/lib/bootstrap.js +149 -0
- package/lib/coreBundle.js +78322 -0
- package/lib/entry/cliDaemon.js +5 -0
- package/lib/entry/dashboardApp.js +3 -0
- package/lib/entry/mcp.js +10 -0
- package/lib/entry/oopBrowserDownload.js +3 -0
- package/lib/{server/deviceDescriptors.js → package.js} +18 -7
- package/lib/server/electron/loader.js +108 -14
- package/lib/serverRegistry.js +1939 -0
- package/lib/serverRegistry.js.LICENSE +65 -0
- package/lib/tools/cli-client/channelSessions.js +141 -0
- package/lib/tools/cli-client/cli.js +7 -0
- package/lib/tools/cli-client/help.json +808 -0
- package/lib/tools/cli-client/minimist.js +128 -0
- package/lib/tools/cli-client/output.js +352 -0
- package/lib/tools/cli-client/program.js +422 -0
- package/lib/tools/cli-client/registry.js +180 -0
- package/lib/tools/cli-client/session.js +261 -0
- package/lib/tools/dashboard/appIcon.png +0 -0
- package/lib/tools/skills/playwright-cli/SKILL.md +493 -0
- package/lib/tools/skills/playwright-cli/references/element-attributes.md +23 -0
- package/lib/tools/skills/playwright-cli/references/playwright-tests.md +39 -0
- package/lib/tools/skills/playwright-cli/references/pr-attachments.md +60 -0
- package/lib/tools/skills/playwright-cli/references/request-mocking.md +87 -0
- package/lib/tools/skills/playwright-cli/references/running-code.md +245 -0
- package/lib/tools/skills/playwright-cli/references/session-management.md +227 -0
- package/lib/tools/skills/playwright-cli/references/storage-state.md +275 -0
- package/lib/tools/skills/playwright-cli/references/test-generation.md +433 -0
- package/lib/tools/skills/playwright-cli/references/tracing.md +139 -0
- package/lib/tools/skills/playwright-cli/references/video-recording.md +216 -0
- package/lib/tools/skills/playwright-component-testing/SKILL.md +136 -0
- package/lib/tools/skills/playwright-component-testing/references/gallery-spec.md +144 -0
- package/lib/tools/skills/playwright-component-testing/references/migration.md +89 -0
- package/lib/tools/skills/playwright-component-testing/references/react.md +69 -0
- package/lib/tools/skills/playwright-component-testing/references/typing.md +173 -0
- package/lib/tools/skills/playwright-component-testing/references/vue.md +77 -0
- package/lib/tools/skills/playwright-trace/SKILL.md +174 -0
- package/lib/tools/utils/extension.js +112 -0
- package/lib/tools/utils/socketConnection.js +108 -0
- package/lib/utilsBundle.js +86038 -66
- package/lib/utilsBundle.js.LICENSE +1890 -0
- package/lib/vite/dashboard/assets/codeMirrorModule--QdMvsKi.css +1 -0
- package/lib/vite/dashboard/assets/codeMirrorModule-CQ8RZGBm.js +32 -0
- package/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
- package/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +1 -0
- package/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +1 -0
- package/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +1 -0
- package/lib/vite/dashboard/assets/index-AwgwcYie.css +1 -0
- package/lib/vite/dashboard/assets/index-hRvO4yU2.js +12 -0
- package/lib/vite/dashboard/assets/safari-na3_-uQk.svg +1 -0
- package/lib/vite/dashboard/index.html +29 -0
- package/lib/vite/dashboard/playwright-logo.svg +24 -0
- package/lib/vite/htmlReport/index.html +2 -61
- package/lib/vite/htmlReport/report.css +2 -0
- package/lib/vite/htmlReport/report.js +32 -0
- package/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +1 -0
- package/lib/vite/recorder/assets/codeMirrorModule-DK72OMRi.js +32 -0
- package/lib/vite/recorder/assets/index-BZpYJZ-P.css +1 -0
- package/lib/vite/recorder/assets/index-Cn0mmDuv.js +129 -0
- package/lib/vite/recorder/index.html +3 -3
- package/lib/vite/traceViewer/assets/codeMirrorModule-BEB2e8M3.js +32 -0
- package/lib/vite/traceViewer/assets/defaultSettingsView-D-g2vrvf.js +184 -0
- package/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +1 -0
- package/lib/vite/traceViewer/assets/xtermModule-B794rD2Z.js +7 -0
- package/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +1 -0
- package/lib/vite/traceViewer/defaultSettingsView.C8BeHuxd.css +1 -0
- package/lib/vite/traceViewer/index.B_TqY17P.css +1 -0
- package/lib/vite/traceViewer/index.html +9 -8
- package/lib/vite/traceViewer/index.oNry3Hjv.js +1 -0
- package/lib/vite/traceViewer/manifest.webmanifest +16 -0
- package/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +1 -0
- package/lib/vite/traceViewer/snapshot.html +4 -15
- package/lib/vite/traceViewer/sw.bundle.js +4 -3
- package/lib/vite/traceViewer/uiMode.CYwC_gH1.js +5 -0
- package/lib/vite/traceViewer/uiMode.CyMfwkXJ.css +1 -0
- package/lib/vite/traceViewer/uiMode.html +6 -5
- package/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +1 -0
- package/lib/webp_codec.LICENSE +173 -0
- package/lib/webp_codec.wasm +0 -0
- package/lib/{utilsBundleImpl/xdg-open → xdg-open} +338 -137
- package/package.json +6 -16
- package/types/protocol.d.ts +10495 -8030
- package/types/structs.d.ts +8 -1
- package/types/types.d.ts +9256 -4825
- package/lib/androidServerImpl.js +0 -63
- package/lib/browserServerImpl.js +0 -88
- package/lib/cli/driver.js +0 -97
- package/lib/cli/program.js +0 -567
- package/lib/cli/programWithTestStub.js +0 -74
- package/lib/client/accessibility.js +0 -49
- package/lib/client/android.js +0 -365
- package/lib/client/api.js +0 -137
- package/lib/client/artifact.js +0 -79
- package/lib/client/browser.js +0 -136
- package/lib/client/browserContext.js +0 -539
- package/lib/client/browserType.js +0 -193
- package/lib/client/cdpSession.js +0 -51
- package/lib/client/channelOwner.js +0 -205
- package/lib/client/clientHelper.js +0 -64
- package/lib/client/clientInstrumentation.js +0 -55
- package/lib/client/clientStackTrace.js +0 -69
- package/lib/client/clock.js +0 -68
- package/lib/client/connection.js +0 -318
- package/lib/client/consoleMessage.js +0 -55
- package/lib/client/coverage.js +0 -44
- package/lib/client/dialog.js +0 -56
- package/lib/client/download.js +0 -62
- package/lib/client/electron.js +0 -133
- package/lib/client/elementHandle.js +0 -284
- package/lib/client/errors.js +0 -77
- package/lib/client/eventEmitter.js +0 -314
- package/lib/client/events.js +0 -98
- package/lib/client/fetch.js +0 -367
- package/lib/client/fileChooser.js +0 -46
- package/lib/client/fileUtils.js +0 -34
- package/lib/client/frame.js +0 -386
- package/lib/client/harRouter.js +0 -87
- package/lib/client/input.js +0 -82
- package/lib/client/jsHandle.js +0 -105
- package/lib/client/jsonPipe.js +0 -39
- package/lib/client/localUtils.js +0 -61
- package/lib/client/locator.js +0 -362
- package/lib/client/network.js +0 -751
- package/lib/client/page.js +0 -709
- package/lib/client/platform.js +0 -74
- package/lib/client/playwright.js +0 -85
- package/lib/client/selectors.js +0 -75
- package/lib/client/stream.js +0 -39
- package/lib/client/timeoutSettings.js +0 -75
- package/lib/client/tracing.js +0 -114
- package/lib/client/types.js +0 -28
- package/lib/client/video.js +0 -59
- package/lib/client/waiter.js +0 -142
- package/lib/client/webError.js +0 -39
- package/lib/client/webSocket.js +0 -111
- package/lib/client/worker.js +0 -63
- package/lib/client/writableStream.js +0 -39
- package/lib/generated/clockSource.js +0 -28
- package/lib/generated/consoleApiSource.js +0 -28
- package/lib/generated/injectedScriptSource.js +0 -28
- package/lib/generated/pollingRecorderSource.js +0 -28
- package/lib/generated/utilityScriptSource.js +0 -28
- package/lib/generated/webSocketMockSource.js +0 -378
- package/lib/inProcessFactory.js +0 -59
- package/lib/inprocess.js +0 -3
- package/lib/outofprocess.js +0 -78
- package/lib/protocol/debug.js +0 -211
- package/lib/protocol/serializers.js +0 -192
- package/lib/protocol/validator.js +0 -2825
- package/lib/protocol/validatorPrimitives.js +0 -179
- package/lib/remote/playwrightConnection.js +0 -266
- package/lib/remote/playwrightServer.js +0 -139
- package/lib/server/accessibility.js +0 -69
- package/lib/server/android/android.js +0 -451
- package/lib/server/android/backendAdb.js +0 -179
- package/lib/server/artifact.js +0 -127
- package/lib/server/bidi/bidiBrowser.js +0 -380
- package/lib/server/bidi/bidiChromium.js +0 -152
- package/lib/server/bidi/bidiConnection.js +0 -187
- package/lib/server/bidi/bidiExecutionContext.js +0 -220
- package/lib/server/bidi/bidiFirefox.js +0 -112
- package/lib/server/bidi/bidiInput.js +0 -146
- package/lib/server/bidi/bidiNetworkManager.js +0 -320
- package/lib/server/bidi/bidiOverCdp.js +0 -102
- package/lib/server/bidi/bidiPage.js +0 -530
- package/lib/server/bidi/bidiPdf.js +0 -106
- package/lib/server/bidi/third_party/bidiCommands.d.js +0 -22
- package/lib/server/bidi/third_party/bidiDeserializer.js +0 -98
- package/lib/server/bidi/third_party/bidiKeyboard.js +0 -256
- package/lib/server/bidi/third_party/bidiProtocol.js +0 -152
- package/lib/server/bidi/third_party/bidiSerializer.js +0 -148
- package/lib/server/bidi/third_party/firefoxPrefs.js +0 -259
- package/lib/server/browser.js +0 -140
- package/lib/server/browserContext.js +0 -650
- package/lib/server/browserType.js +0 -326
- package/lib/server/callLog.js +0 -82
- package/lib/server/chromium/chromium.js +0 -376
- package/lib/server/chromium/chromiumSwitches.js +0 -101
- package/lib/server/chromium/crAccessibility.js +0 -263
- package/lib/server/chromium/crBrowser.js +0 -498
- package/lib/server/chromium/crConnection.js +0 -324
- package/lib/server/chromium/crCoverage.js +0 -232
- package/lib/server/chromium/crDevTools.js +0 -117
- package/lib/server/chromium/crDragDrop.js +0 -126
- package/lib/server/chromium/crExecutionContext.js +0 -145
- package/lib/server/chromium/crInput.js +0 -184
- package/lib/server/chromium/crNetworkManager.js +0 -666
- package/lib/server/chromium/crPage.js +0 -1055
- package/lib/server/chromium/crPdf.js +0 -121
- package/lib/server/chromium/crProtocolHelper.js +0 -145
- package/lib/server/chromium/crServiceWorker.js +0 -130
- package/lib/server/chromium/defaultFontFamilies.js +0 -162
- package/lib/server/chromium/protocol.d.js +0 -16
- package/lib/server/chromium/videoRecorder.js +0 -121
- package/lib/server/clock.js +0 -137
- package/lib/server/codegen/csharp.js +0 -329
- package/lib/server/codegen/java.js +0 -270
- package/lib/server/codegen/javascript.js +0 -268
- package/lib/server/codegen/jsonl.js +0 -51
- package/lib/server/codegen/language.js +0 -111
- package/lib/server/codegen/languages.js +0 -68
- package/lib/server/codegen/python.js +0 -277
- package/lib/server/codegen/types.js +0 -16
- package/lib/server/console.js +0 -53
- package/lib/server/cookieStore.js +0 -204
- package/lib/server/debugController.js +0 -185
- package/lib/server/debugger.js +0 -136
- package/lib/server/deviceDescriptorsSource.json +0 -1669
- package/lib/server/dialog.js +0 -72
- package/lib/server/dispatchers/androidDispatcher.js +0 -293
- package/lib/server/dispatchers/artifactDispatcher.js +0 -118
- package/lib/server/dispatchers/browserContextDispatcher.js +0 -328
- package/lib/server/dispatchers/browserDispatcher.js +0 -151
- package/lib/server/dispatchers/browserTypeDispatcher.js +0 -55
- package/lib/server/dispatchers/cdpSessionDispatcher.js +0 -44
- package/lib/server/dispatchers/debugControllerDispatcher.js +0 -87
- package/lib/server/dispatchers/dialogDispatcher.js +0 -47
- package/lib/server/dispatchers/dispatcher.js +0 -346
- package/lib/server/dispatchers/electronDispatcher.js +0 -90
- package/lib/server/dispatchers/elementHandlerDispatcher.js +0 -191
- package/lib/server/dispatchers/frameDispatcher.js +0 -224
- package/lib/server/dispatchers/jsHandleDispatcher.js +0 -80
- package/lib/server/dispatchers/jsonPipeDispatcher.js +0 -58
- package/lib/server/dispatchers/localUtilsDispatcher.js +0 -155
- package/lib/server/dispatchers/networkDispatchers.js +0 -204
- package/lib/server/dispatchers/pageDispatcher.js +0 -328
- package/lib/server/dispatchers/playwrightDispatcher.js +0 -100
- package/lib/server/dispatchers/selectorsDispatcher.js +0 -40
- package/lib/server/dispatchers/streamDispatcher.js +0 -60
- package/lib/server/dispatchers/tracingDispatcher.js +0 -59
- package/lib/server/dispatchers/webSocketRouteDispatcher.js +0 -154
- package/lib/server/dispatchers/writableStreamDispatcher.js +0 -73
- package/lib/server/dom.js +0 -869
- package/lib/server/download.js +0 -70
- package/lib/server/electron/electron.js +0 -277
- package/lib/server/errors.js +0 -69
- package/lib/server/fetch.js +0 -640
- package/lib/server/fileChooser.js +0 -43
- package/lib/server/fileUploadUtils.js +0 -84
- package/lib/server/firefox/ffAccessibility.js +0 -238
- package/lib/server/firefox/ffBrowser.js +0 -404
- package/lib/server/firefox/ffConnection.js +0 -147
- package/lib/server/firefox/ffExecutionContext.js +0 -149
- package/lib/server/firefox/ffInput.js +0 -159
- package/lib/server/firefox/ffNetworkManager.js +0 -254
- package/lib/server/firefox/ffPage.js +0 -501
- package/lib/server/firefox/firefox.js +0 -106
- package/lib/server/firefox/protocol.d.js +0 -16
- package/lib/server/formData.js +0 -147
- package/lib/server/frameSelectors.js +0 -137
- package/lib/server/frames.js +0 -1555
- package/lib/server/har/harRecorder.js +0 -147
- package/lib/server/har/harTracer.js +0 -606
- package/lib/server/harBackend.js +0 -157
- package/lib/server/helper.js +0 -100
- package/lib/server/index.js +0 -61
- package/lib/server/input.js +0 -280
- package/lib/server/instrumentation.js +0 -75
- package/lib/server/javascript.js +0 -299
- package/lib/server/launchApp.js +0 -110
- package/lib/server/localUtils.js +0 -211
- package/lib/server/macEditingCommands.js +0 -143
- package/lib/server/network.js +0 -583
- package/lib/server/page.js +0 -790
- package/lib/server/pageBinding.js +0 -88
- package/lib/server/pipeTransport.js +0 -89
- package/lib/server/playwright.js +0 -81
- package/lib/server/progress.js +0 -104
- package/lib/server/protocolError.js +0 -52
- package/lib/server/recorder/chat.js +0 -161
- package/lib/server/recorder/contextRecorder.js +0 -286
- package/lib/server/recorder/recorderApp.js +0 -184
- package/lib/server/recorder/recorderCollection.js +0 -116
- package/lib/server/recorder/recorderFrontend.js +0 -16
- package/lib/server/recorder/recorderRunner.js +0 -135
- package/lib/server/recorder/recorderUtils.js +0 -100
- package/lib/server/recorder/throttledFile.js +0 -57
- package/lib/server/recorder.js +0 -360
- package/lib/server/registry/browserFetcher.js +0 -175
- package/lib/server/registry/dependencies.js +0 -371
- package/lib/server/registry/index.js +0 -1271
- package/lib/server/registry/nativeDeps.js +0 -1105
- package/lib/server/registry/oopDownloadBrowserMain.js +0 -120
- package/lib/server/screenshotter.js +0 -332
- package/lib/server/selectors.js +0 -112
- package/lib/server/socksClientCertificatesInterceptor.js +0 -321
- package/lib/server/socksInterceptor.js +0 -95
- package/lib/server/storageScript.js +0 -154
- package/lib/server/timeoutSettings.js +0 -89
- package/lib/server/trace/recorder/snapshotter.js +0 -143
- package/lib/server/trace/recorder/snapshotterInjected.js +0 -539
- package/lib/server/trace/recorder/tracing.js +0 -593
- package/lib/server/trace/test/inMemorySnapshotter.js +0 -87
- package/lib/server/trace/viewer/traceViewer.js +0 -249
- package/lib/server/transport.js +0 -183
- package/lib/server/types.js +0 -28
- package/lib/server/usKeyboardLayout.js +0 -145
- package/lib/server/utils/ascii.js +0 -44
- package/lib/server/utils/comparators.js +0 -161
- package/lib/server/utils/crypto.js +0 -216
- package/lib/server/utils/debug.js +0 -47
- package/lib/server/utils/debugLogger.js +0 -114
- package/lib/server/utils/env.js +0 -68
- package/lib/server/utils/eventsHelper.js +0 -39
- package/lib/server/utils/expectUtils.js +0 -38
- package/lib/server/utils/fileUtils.js +0 -191
- package/lib/server/utils/happyEyeballs.js +0 -207
- package/lib/server/utils/hostPlatform.js +0 -109
- package/lib/server/utils/httpServer.js +0 -218
- package/lib/server/utils/image_tools/colorUtils.js +0 -89
- package/lib/server/utils/image_tools/compare.js +0 -109
- package/lib/server/utils/image_tools/imageChannel.js +0 -78
- package/lib/server/utils/image_tools/stats.js +0 -102
- package/lib/server/utils/linuxUtils.js +0 -71
- package/lib/server/utils/network.js +0 -217
- package/lib/server/utils/nodePlatform.js +0 -148
- package/lib/server/utils/pipeTransport.js +0 -84
- package/lib/server/utils/processLauncher.js +0 -238
- package/lib/server/utils/profiler.js +0 -65
- package/lib/server/utils/socksProxy.js +0 -511
- package/lib/server/utils/spawnAsync.js +0 -41
- package/lib/server/utils/task.js +0 -51
- package/lib/server/utils/userAgent.js +0 -98
- package/lib/server/utils/wsServer.js +0 -132
- package/lib/server/utils/zipFile.js +0 -74
- package/lib/server/utils/zones.js +0 -57
- package/lib/server/webkit/protocol.d.js +0 -16
- package/lib/server/webkit/webkit.js +0 -100
- package/lib/server/webkit/wkAccessibility.js +0 -237
- package/lib/server/webkit/wkBrowser.js +0 -312
- package/lib/server/webkit/wkConnection.js +0 -149
- package/lib/server/webkit/wkExecutionContext.js +0 -153
- package/lib/server/webkit/wkInput.js +0 -181
- package/lib/server/webkit/wkInterceptableRequest.js +0 -169
- package/lib/server/webkit/wkPage.js +0 -1114
- package/lib/server/webkit/wkProvisionalPage.js +0 -83
- package/lib/server/webkit/wkWorkers.js +0 -104
- package/lib/third_party/pixelmatch.js +0 -255
- package/lib/utils/isomorphic/ariaSnapshot.js +0 -384
- package/lib/utils/isomorphic/assert.js +0 -31
- package/lib/utils/isomorphic/builtins.js +0 -90
- package/lib/utils/isomorphic/colors.js +0 -72
- package/lib/utils/isomorphic/cssParser.js +0 -246
- package/lib/utils/isomorphic/cssTokenizer.js +0 -1051
- package/lib/utils/isomorphic/headers.js +0 -53
- package/lib/utils/isomorphic/locatorGenerators.js +0 -655
- package/lib/utils/isomorphic/locatorParser.js +0 -176
- package/lib/utils/isomorphic/locatorUtils.js +0 -81
- package/lib/utils/isomorphic/manualPromise.js +0 -115
- package/lib/utils/isomorphic/mimeType.js +0 -460
- package/lib/utils/isomorphic/multimap.js +0 -81
- package/lib/utils/isomorphic/rtti.js +0 -43
- package/lib/utils/isomorphic/selectorParser.js +0 -387
- package/lib/utils/isomorphic/semaphore.js +0 -54
- package/lib/utils/isomorphic/stackTrace.js +0 -158
- package/lib/utils/isomorphic/stringUtils.js +0 -176
- package/lib/utils/isomorphic/time.js +0 -44
- package/lib/utils/isomorphic/timeoutRunner.js +0 -67
- package/lib/utils/isomorphic/traceUtils.js +0 -59
- package/lib/utils/isomorphic/types.js +0 -16
- package/lib/utils/isomorphic/urlMatch.js +0 -167
- package/lib/utils/isomorphic/utilityScriptSerializers.js +0 -248
- package/lib/utils.js +0 -101
- package/lib/utilsBundleImpl/index.js +0 -208
- package/lib/vite/recorder/assets/codeMirrorModule-C3UTv-Ge.css +0 -1
- package/lib/vite/recorder/assets/codeMirrorModule-DVQi6prl.js +0 -24
- package/lib/vite/recorder/assets/index-97EUAAbk.js +0 -184
- package/lib/vite/recorder/assets/index-eHBmevrY.css +0 -1
- package/lib/vite/traceViewer/assets/codeMirrorModule-DwAiTpyC.js +0 -24
- package/lib/vite/traceViewer/assets/defaultSettingsView-DkkRvn5X.js +0 -265
- package/lib/vite/traceViewer/assets/xtermModule-BoAIEibi.js +0 -9
- package/lib/vite/traceViewer/codeMirrorModule.C3UTv-Ge.css +0 -1
- package/lib/vite/traceViewer/defaultSettingsView.QdHITyLI.css +0 -1
- package/lib/vite/traceViewer/index.CFOW-Ezb.css +0 -1
- package/lib/vite/traceViewer/index.DvtSwn6E.js +0 -2
- package/lib/vite/traceViewer/uiMode.BatfzHMG.css +0 -1
- package/lib/vite/traceViewer/uiMode.Sdytl9wc.js +0 -5
- package/lib/vite/traceViewer/xtermModule.Beg8tuEN.css +0 -32
- package/lib/zipBundle.js +0 -34
- package/lib/zipBundleImpl.js +0 -5
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var crDragDrop_exports = {};
|
|
20
|
-
__export(crDragDrop_exports, {
|
|
21
|
-
DragManager: () => DragManager
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(crDragDrop_exports);
|
|
24
|
-
var import_crProtocolHelper = require("./crProtocolHelper");
|
|
25
|
-
var import_utils = require("../../utils");
|
|
26
|
-
class DragManager {
|
|
27
|
-
constructor(page) {
|
|
28
|
-
this._dragState = null;
|
|
29
|
-
this._lastPosition = { x: 0, y: 0 };
|
|
30
|
-
this._crPage = page;
|
|
31
|
-
}
|
|
32
|
-
async cancelDrag() {
|
|
33
|
-
if (!this._dragState)
|
|
34
|
-
return false;
|
|
35
|
-
await this._crPage._mainFrameSession._client.send("Input.dispatchDragEvent", {
|
|
36
|
-
type: "dragCancel",
|
|
37
|
-
x: this._lastPosition.x,
|
|
38
|
-
y: this._lastPosition.y,
|
|
39
|
-
data: {
|
|
40
|
-
items: [],
|
|
41
|
-
dragOperationsMask: 65535
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
this._dragState = null;
|
|
45
|
-
return true;
|
|
46
|
-
}
|
|
47
|
-
async interceptDragCausedByMove(x, y, button, buttons, modifiers, moveCallback) {
|
|
48
|
-
this._lastPosition = { x, y };
|
|
49
|
-
if (this._dragState) {
|
|
50
|
-
await this._crPage._mainFrameSession._client.send("Input.dispatchDragEvent", {
|
|
51
|
-
type: "dragOver",
|
|
52
|
-
x,
|
|
53
|
-
y,
|
|
54
|
-
data: this._dragState,
|
|
55
|
-
modifiers: (0, import_crProtocolHelper.toModifiersMask)(modifiers)
|
|
56
|
-
});
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
if (button !== "left")
|
|
60
|
-
return moveCallback();
|
|
61
|
-
const client = this._crPage._mainFrameSession._client;
|
|
62
|
-
let onDragIntercepted;
|
|
63
|
-
const dragInterceptedPromise = new Promise((x2) => onDragIntercepted = x2);
|
|
64
|
-
function setupDragListeners() {
|
|
65
|
-
let didStartDrag = Promise.resolve(false);
|
|
66
|
-
let dragEvent = null;
|
|
67
|
-
const dragListener = (event) => dragEvent = event;
|
|
68
|
-
const mouseListener = () => {
|
|
69
|
-
didStartDrag = new Promise((callback) => {
|
|
70
|
-
window.addEventListener("dragstart", dragListener, { once: true, capture: true });
|
|
71
|
-
setTimeout(() => callback(dragEvent ? !dragEvent.defaultPrevented : false), 0);
|
|
72
|
-
});
|
|
73
|
-
};
|
|
74
|
-
window.addEventListener("mousemove", mouseListener, { once: true, capture: true });
|
|
75
|
-
window.__cleanupDrag = async () => {
|
|
76
|
-
const val = await didStartDrag;
|
|
77
|
-
window.removeEventListener("mousemove", mouseListener, { capture: true });
|
|
78
|
-
window.removeEventListener("dragstart", dragListener, { capture: true });
|
|
79
|
-
delete window.__cleanupDrag;
|
|
80
|
-
return val;
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
await this._crPage._page.safeNonStallingEvaluateInAllFrames(`(${setupDragListeners.toString()})()`, "utility");
|
|
84
|
-
client.on("Input.dragIntercepted", onDragIntercepted);
|
|
85
|
-
try {
|
|
86
|
-
await client.send("Input.setInterceptDrags", { enabled: true });
|
|
87
|
-
} catch {
|
|
88
|
-
client.off("Input.dragIntercepted", onDragIntercepted);
|
|
89
|
-
return moveCallback();
|
|
90
|
-
}
|
|
91
|
-
await moveCallback();
|
|
92
|
-
const expectingDrag = (await Promise.all(this._crPage._page.frames().map(async (frame) => {
|
|
93
|
-
return frame.nonStallingEvaluateInExistingContext("window.__cleanupDrag && window.__cleanupDrag()", "utility").catch(() => false);
|
|
94
|
-
}))).some((x2) => x2);
|
|
95
|
-
this._dragState = expectingDrag ? (await dragInterceptedPromise).data : null;
|
|
96
|
-
client.off("Input.dragIntercepted", onDragIntercepted);
|
|
97
|
-
await client.send("Input.setInterceptDrags", { enabled: false });
|
|
98
|
-
if (this._dragState) {
|
|
99
|
-
await this._crPage._mainFrameSession._client.send("Input.dispatchDragEvent", {
|
|
100
|
-
type: "dragEnter",
|
|
101
|
-
x,
|
|
102
|
-
y,
|
|
103
|
-
data: this._dragState,
|
|
104
|
-
modifiers: (0, import_crProtocolHelper.toModifiersMask)(modifiers)
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
isDragging() {
|
|
109
|
-
return !!this._dragState;
|
|
110
|
-
}
|
|
111
|
-
async drop(x, y, modifiers) {
|
|
112
|
-
(0, import_utils.assert)(this._dragState, "missing drag state");
|
|
113
|
-
await this._crPage._mainFrameSession._client.send("Input.dispatchDragEvent", {
|
|
114
|
-
type: "drop",
|
|
115
|
-
x,
|
|
116
|
-
y,
|
|
117
|
-
data: this._dragState,
|
|
118
|
-
modifiers: (0, import_crProtocolHelper.toModifiersMask)(modifiers)
|
|
119
|
-
});
|
|
120
|
-
this._dragState = null;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
124
|
-
0 && (module.exports = {
|
|
125
|
-
DragManager
|
|
126
|
-
});
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var crExecutionContext_exports = {};
|
|
30
|
-
__export(crExecutionContext_exports, {
|
|
31
|
-
CRExecutionContext: () => CRExecutionContext,
|
|
32
|
-
createHandle: () => createHandle
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(crExecutionContext_exports);
|
|
35
|
-
var import_assert = require("../../utils/isomorphic/assert");
|
|
36
|
-
var import_crProtocolHelper = require("./crProtocolHelper");
|
|
37
|
-
var import_stackTrace = require("../../utils/isomorphic/stackTrace");
|
|
38
|
-
var js = __toESM(require("../javascript"));
|
|
39
|
-
var dom = __toESM(require("../dom"));
|
|
40
|
-
var import_protocolError = require("../protocolError");
|
|
41
|
-
class CRExecutionContext {
|
|
42
|
-
constructor(client, contextPayload) {
|
|
43
|
-
this._client = client;
|
|
44
|
-
this._contextId = contextPayload.id;
|
|
45
|
-
}
|
|
46
|
-
async rawEvaluateJSON(expression) {
|
|
47
|
-
const { exceptionDetails, result: remoteObject } = await this._client.send("Runtime.evaluate", {
|
|
48
|
-
expression,
|
|
49
|
-
contextId: this._contextId,
|
|
50
|
-
returnByValue: true
|
|
51
|
-
}).catch(rewriteError);
|
|
52
|
-
if (exceptionDetails)
|
|
53
|
-
throw new js.JavaScriptErrorInEvaluate((0, import_crProtocolHelper.getExceptionMessage)(exceptionDetails));
|
|
54
|
-
return remoteObject.value;
|
|
55
|
-
}
|
|
56
|
-
async rawEvaluateHandle(context, expression) {
|
|
57
|
-
const { exceptionDetails, result: remoteObject } = await this._client.send("Runtime.evaluate", {
|
|
58
|
-
expression,
|
|
59
|
-
contextId: this._contextId
|
|
60
|
-
}).catch(rewriteError);
|
|
61
|
-
if (exceptionDetails)
|
|
62
|
-
throw new js.JavaScriptErrorInEvaluate((0, import_crProtocolHelper.getExceptionMessage)(exceptionDetails));
|
|
63
|
-
return createHandle(context, remoteObject);
|
|
64
|
-
}
|
|
65
|
-
async evaluateWithArguments(expression, returnByValue, utilityScript, values, handles) {
|
|
66
|
-
const { exceptionDetails, result: remoteObject } = await this._client.send("Runtime.callFunctionOn", {
|
|
67
|
-
functionDeclaration: expression,
|
|
68
|
-
objectId: utilityScript._objectId,
|
|
69
|
-
arguments: [
|
|
70
|
-
{ objectId: utilityScript._objectId },
|
|
71
|
-
...values.map((value) => ({ value })),
|
|
72
|
-
...handles.map((handle) => ({ objectId: handle._objectId }))
|
|
73
|
-
],
|
|
74
|
-
returnByValue,
|
|
75
|
-
awaitPromise: true,
|
|
76
|
-
userGesture: true
|
|
77
|
-
}).catch(rewriteError);
|
|
78
|
-
if (exceptionDetails)
|
|
79
|
-
throw new js.JavaScriptErrorInEvaluate((0, import_crProtocolHelper.getExceptionMessage)(exceptionDetails));
|
|
80
|
-
return returnByValue ? js.parseEvaluationResultValue(remoteObject.value) : createHandle(utilityScript._context, remoteObject);
|
|
81
|
-
}
|
|
82
|
-
async getProperties(object) {
|
|
83
|
-
const response = await this._client.send("Runtime.getProperties", {
|
|
84
|
-
objectId: object._objectId,
|
|
85
|
-
ownProperties: true
|
|
86
|
-
});
|
|
87
|
-
const result = /* @__PURE__ */ new Map();
|
|
88
|
-
for (const property of response.result) {
|
|
89
|
-
if (!property.enumerable || !property.value)
|
|
90
|
-
continue;
|
|
91
|
-
result.set(property.name, createHandle(object._context, property.value));
|
|
92
|
-
}
|
|
93
|
-
return result;
|
|
94
|
-
}
|
|
95
|
-
async releaseHandle(handle) {
|
|
96
|
-
if (!handle._objectId)
|
|
97
|
-
return;
|
|
98
|
-
await (0, import_crProtocolHelper.releaseObject)(this._client, handle._objectId);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
function rewriteError(error) {
|
|
102
|
-
if (error.message.includes("Object reference chain is too long"))
|
|
103
|
-
throw new Error("Cannot serialize result: object reference chain is too long.");
|
|
104
|
-
if (error.message.includes("Object couldn't be returned by value"))
|
|
105
|
-
return { result: { type: "undefined" } };
|
|
106
|
-
if (error instanceof TypeError && error.message.startsWith("Converting circular structure to JSON"))
|
|
107
|
-
(0, import_stackTrace.rewriteErrorMessage)(error, error.message + " Are you passing a nested JSHandle?");
|
|
108
|
-
if (!js.isJavaScriptErrorInEvaluate(error) && !(0, import_protocolError.isSessionClosedError)(error))
|
|
109
|
-
throw new Error("Execution context was destroyed, most likely because of a navigation.");
|
|
110
|
-
throw error;
|
|
111
|
-
}
|
|
112
|
-
function potentiallyUnserializableValue(remoteObject) {
|
|
113
|
-
const value = remoteObject.value;
|
|
114
|
-
const unserializableValue = remoteObject.unserializableValue;
|
|
115
|
-
return unserializableValue ? js.parseUnserializableValue(unserializableValue) : value;
|
|
116
|
-
}
|
|
117
|
-
function renderPreview(object) {
|
|
118
|
-
if (object.type === "undefined")
|
|
119
|
-
return "undefined";
|
|
120
|
-
if ("value" in object)
|
|
121
|
-
return String(object.value);
|
|
122
|
-
if (object.unserializableValue)
|
|
123
|
-
return String(object.unserializableValue);
|
|
124
|
-
if (object.description === "Object" && object.preview) {
|
|
125
|
-
const tokens = [];
|
|
126
|
-
for (const { name, value } of object.preview.properties)
|
|
127
|
-
tokens.push(`${name}: ${value}`);
|
|
128
|
-
return `{${tokens.join(", ")}}`;
|
|
129
|
-
}
|
|
130
|
-
if (object.subtype === "array" && object.preview)
|
|
131
|
-
return js.sparseArrayToString(object.preview.properties);
|
|
132
|
-
return object.description;
|
|
133
|
-
}
|
|
134
|
-
function createHandle(context, remoteObject) {
|
|
135
|
-
if (remoteObject.subtype === "node") {
|
|
136
|
-
(0, import_assert.assert)(context instanceof dom.FrameExecutionContext);
|
|
137
|
-
return new dom.ElementHandle(context, remoteObject.objectId);
|
|
138
|
-
}
|
|
139
|
-
return new js.JSHandle(context, remoteObject.subtype || remoteObject.type, renderPreview(remoteObject), remoteObject.objectId, potentiallyUnserializableValue(remoteObject));
|
|
140
|
-
}
|
|
141
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
142
|
-
0 && (module.exports = {
|
|
143
|
-
CRExecutionContext,
|
|
144
|
-
createHandle
|
|
145
|
-
});
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var crInput_exports = {};
|
|
30
|
-
__export(crInput_exports, {
|
|
31
|
-
RawKeyboardImpl: () => RawKeyboardImpl,
|
|
32
|
-
RawMouseImpl: () => RawMouseImpl,
|
|
33
|
-
RawTouchscreenImpl: () => RawTouchscreenImpl
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(crInput_exports);
|
|
36
|
-
var import_utils = require("../../utils");
|
|
37
|
-
var input = __toESM(require("../input"));
|
|
38
|
-
var import_macEditingCommands = require("../macEditingCommands");
|
|
39
|
-
var import_crProtocolHelper = require("./crProtocolHelper");
|
|
40
|
-
class RawKeyboardImpl {
|
|
41
|
-
constructor(_client, _isMac, _dragManger) {
|
|
42
|
-
this._client = _client;
|
|
43
|
-
this._isMac = _isMac;
|
|
44
|
-
this._dragManger = _dragManger;
|
|
45
|
-
}
|
|
46
|
-
_commandsForCode(code, modifiers) {
|
|
47
|
-
if (!this._isMac)
|
|
48
|
-
return [];
|
|
49
|
-
const parts = [];
|
|
50
|
-
for (const modifier of ["Shift", "Control", "Alt", "Meta"]) {
|
|
51
|
-
if (modifiers.has(modifier))
|
|
52
|
-
parts.push(modifier);
|
|
53
|
-
}
|
|
54
|
-
parts.push(code);
|
|
55
|
-
const shortcut = parts.join("+");
|
|
56
|
-
let commands = import_macEditingCommands.macEditingCommands[shortcut] || [];
|
|
57
|
-
if ((0, import_utils.isString)(commands))
|
|
58
|
-
commands = [commands];
|
|
59
|
-
commands = commands.filter((x) => !x.startsWith("insert"));
|
|
60
|
-
return commands.map((c) => c.substring(0, c.length - 1));
|
|
61
|
-
}
|
|
62
|
-
async keydown(modifiers, keyName, description, autoRepeat) {
|
|
63
|
-
const { code, key, location, text } = description;
|
|
64
|
-
if (code === "Escape" && await this._dragManger.cancelDrag())
|
|
65
|
-
return;
|
|
66
|
-
const commands = this._commandsForCode(code, modifiers);
|
|
67
|
-
await this._client.send("Input.dispatchKeyEvent", {
|
|
68
|
-
type: text ? "keyDown" : "rawKeyDown",
|
|
69
|
-
modifiers: (0, import_crProtocolHelper.toModifiersMask)(modifiers),
|
|
70
|
-
windowsVirtualKeyCode: description.keyCodeWithoutLocation,
|
|
71
|
-
code,
|
|
72
|
-
commands,
|
|
73
|
-
key,
|
|
74
|
-
text,
|
|
75
|
-
unmodifiedText: text,
|
|
76
|
-
autoRepeat,
|
|
77
|
-
location,
|
|
78
|
-
isKeypad: location === input.keypadLocation
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
async keyup(modifiers, keyName, description) {
|
|
82
|
-
const { code, key, location } = description;
|
|
83
|
-
await this._client.send("Input.dispatchKeyEvent", {
|
|
84
|
-
type: "keyUp",
|
|
85
|
-
modifiers: (0, import_crProtocolHelper.toModifiersMask)(modifiers),
|
|
86
|
-
key,
|
|
87
|
-
windowsVirtualKeyCode: description.keyCodeWithoutLocation,
|
|
88
|
-
code,
|
|
89
|
-
location
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
async sendText(text) {
|
|
93
|
-
await this._client.send("Input.insertText", { text });
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
class RawMouseImpl {
|
|
97
|
-
constructor(page, client, dragManager) {
|
|
98
|
-
this._page = page;
|
|
99
|
-
this._client = client;
|
|
100
|
-
this._dragManager = dragManager;
|
|
101
|
-
}
|
|
102
|
-
async move(x, y, button, buttons, modifiers, forClick) {
|
|
103
|
-
const actualMove = async () => {
|
|
104
|
-
await this._client.send("Input.dispatchMouseEvent", {
|
|
105
|
-
type: "mouseMoved",
|
|
106
|
-
button,
|
|
107
|
-
buttons: (0, import_crProtocolHelper.toButtonsMask)(buttons),
|
|
108
|
-
x,
|
|
109
|
-
y,
|
|
110
|
-
modifiers: (0, import_crProtocolHelper.toModifiersMask)(modifiers)
|
|
111
|
-
});
|
|
112
|
-
};
|
|
113
|
-
if (forClick) {
|
|
114
|
-
return actualMove();
|
|
115
|
-
}
|
|
116
|
-
await this._dragManager.interceptDragCausedByMove(x, y, button, buttons, modifiers, actualMove);
|
|
117
|
-
}
|
|
118
|
-
async down(x, y, button, buttons, modifiers, clickCount) {
|
|
119
|
-
if (this._dragManager.isDragging())
|
|
120
|
-
return;
|
|
121
|
-
await this._client.send("Input.dispatchMouseEvent", {
|
|
122
|
-
type: "mousePressed",
|
|
123
|
-
button,
|
|
124
|
-
buttons: (0, import_crProtocolHelper.toButtonsMask)(buttons),
|
|
125
|
-
x,
|
|
126
|
-
y,
|
|
127
|
-
modifiers: (0, import_crProtocolHelper.toModifiersMask)(modifiers),
|
|
128
|
-
clickCount
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
async up(x, y, button, buttons, modifiers, clickCount) {
|
|
132
|
-
if (this._dragManager.isDragging()) {
|
|
133
|
-
await this._dragManager.drop(x, y, modifiers);
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
await this._client.send("Input.dispatchMouseEvent", {
|
|
137
|
-
type: "mouseReleased",
|
|
138
|
-
button,
|
|
139
|
-
buttons: (0, import_crProtocolHelper.toButtonsMask)(buttons),
|
|
140
|
-
x,
|
|
141
|
-
y,
|
|
142
|
-
modifiers: (0, import_crProtocolHelper.toModifiersMask)(modifiers),
|
|
143
|
-
clickCount
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
async wheel(x, y, buttons, modifiers, deltaX, deltaY) {
|
|
147
|
-
await this._client.send("Input.dispatchMouseEvent", {
|
|
148
|
-
type: "mouseWheel",
|
|
149
|
-
x,
|
|
150
|
-
y,
|
|
151
|
-
modifiers: (0, import_crProtocolHelper.toModifiersMask)(modifiers),
|
|
152
|
-
deltaX,
|
|
153
|
-
deltaY
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
class RawTouchscreenImpl {
|
|
158
|
-
constructor(client) {
|
|
159
|
-
this._client = client;
|
|
160
|
-
}
|
|
161
|
-
async tap(x, y, modifiers) {
|
|
162
|
-
await Promise.all([
|
|
163
|
-
this._client.send("Input.dispatchTouchEvent", {
|
|
164
|
-
type: "touchStart",
|
|
165
|
-
modifiers: (0, import_crProtocolHelper.toModifiersMask)(modifiers),
|
|
166
|
-
touchPoints: [{
|
|
167
|
-
x,
|
|
168
|
-
y
|
|
169
|
-
}]
|
|
170
|
-
}),
|
|
171
|
-
this._client.send("Input.dispatchTouchEvent", {
|
|
172
|
-
type: "touchEnd",
|
|
173
|
-
modifiers: (0, import_crProtocolHelper.toModifiersMask)(modifiers),
|
|
174
|
-
touchPoints: []
|
|
175
|
-
})
|
|
176
|
-
]);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
180
|
-
0 && (module.exports = {
|
|
181
|
-
RawKeyboardImpl,
|
|
182
|
-
RawMouseImpl,
|
|
183
|
-
RawTouchscreenImpl
|
|
184
|
-
});
|