chrome-devtools-frontend 1.0.1040857 → 1.0.1070764
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/AUTHORS +4 -1
- package/README.md +4 -10
- package/config/gni/devtools_grd_files.gni +41 -24
- package/config/gni/devtools_image_files.gni +4 -0
- package/docs/README.md +81 -0
- package/{ARCHITECTURE.md → docs/architecture_of_devtools.md} +5 -6
- package/docs/{images/architecture-lazy-loading-features.png → architecture_of_devtools_lazy_loading_features.png} +0 -0
- package/docs/{images/module-visibility-rules.png → architecture_of_devtools_module_visibility_rules.png} +0 -0
- package/docs/design_guidelines.md +3 -1
- package/docs/{images/DevToolsDesignGuidelines.png → design_guidelines.png} +0 -0
- package/docs/l10n.md +293 -0
- package/docs/navbar.md +13 -0
- package/docs/third_party_guidelines.md +78 -0
- package/docs/workflows.md +6 -1
- package/extension-api/ExtensionAPI.d.ts +1 -0
- package/front_end/Images/src/edit-icon.svg +3 -0
- package/front_end/Images/src/frame-embedded-icon.svg +61 -0
- package/front_end/Images/src/frame-icon.svg +54 -0
- package/front_end/Images/src/trash_bin_material_icon.svg +1 -0
- package/front_end/Images/src/triangle-expanded.svg +1 -1
- package/front_end/Tests.js +0 -25
- package/front_end/core/common/ResourceType.ts +7 -1
- package/front_end/core/common/Revealer.ts +3 -0
- package/front_end/core/common/common.ts +2 -0
- package/front_end/core/dom_extension/DOMExtension.ts +1 -138
- package/front_end/core/host/InspectorFrontendHostAPI.ts +2 -0
- package/front_end/core/host/ResourceLoader.ts +15 -5
- package/front_end/core/host/UserMetrics.ts +43 -10
- package/front_end/core/i18n/locales/af.json +194 -110
- package/front_end/core/i18n/locales/am.json +205 -121
- package/front_end/core/i18n/locales/ar.json +196 -112
- package/front_end/core/i18n/locales/as.json +195 -111
- package/front_end/core/i18n/locales/az.json +196 -112
- package/front_end/core/i18n/locales/be.json +193 -109
- package/front_end/core/i18n/locales/bg.json +193 -109
- package/front_end/core/i18n/locales/bn.json +197 -113
- package/front_end/core/i18n/locales/bs.json +194 -110
- package/front_end/core/i18n/locales/ca.json +197 -113
- package/front_end/core/i18n/locales/cs.json +192 -108
- package/front_end/core/i18n/locales/cy.json +193 -109
- package/front_end/core/i18n/locales/da.json +194 -110
- package/front_end/core/i18n/locales/de.json +199 -115
- package/front_end/core/i18n/locales/el.json +191 -107
- package/front_end/core/i18n/locales/en-GB.json +193 -109
- package/front_end/core/i18n/locales/en-US.json +313 -229
- package/front_end/core/i18n/locales/en-XL.json +313 -229
- package/front_end/core/i18n/locales/es-419.json +195 -111
- package/front_end/core/i18n/locales/es.json +192 -108
- package/front_end/core/i18n/locales/et.json +195 -111
- package/front_end/core/i18n/locales/eu.json +197 -113
- package/front_end/core/i18n/locales/fa.json +243 -159
- package/front_end/core/i18n/locales/fi.json +192 -108
- package/front_end/core/i18n/locales/fil.json +193 -109
- package/front_end/core/i18n/locales/fr-CA.json +198 -114
- package/front_end/core/i18n/locales/fr.json +220 -136
- package/front_end/core/i18n/locales/gl.json +196 -112
- package/front_end/core/i18n/locales/gu.json +196 -112
- package/front_end/core/i18n/locales/he.json +201 -117
- package/front_end/core/i18n/locales/hi.json +200 -116
- package/front_end/core/i18n/locales/hr.json +192 -108
- package/front_end/core/i18n/locales/hu.json +195 -111
- package/front_end/core/i18n/locales/hy.json +193 -109
- package/front_end/core/i18n/locales/id.json +198 -114
- package/front_end/core/i18n/locales/is.json +193 -109
- package/front_end/core/i18n/locales/it.json +194 -110
- package/front_end/core/i18n/locales/ja.json +192 -108
- package/front_end/core/i18n/locales/ka.json +194 -110
- package/front_end/core/i18n/locales/kk.json +194 -110
- package/front_end/core/i18n/locales/km.json +196 -112
- package/front_end/core/i18n/locales/kn.json +193 -109
- package/front_end/core/i18n/locales/ko.json +196 -112
- package/front_end/core/i18n/locales/ky.json +196 -112
- package/front_end/core/i18n/locales/lo.json +196 -112
- package/front_end/core/i18n/locales/lt.json +192 -108
- package/front_end/core/i18n/locales/lv.json +194 -110
- package/front_end/core/i18n/locales/mk.json +194 -110
- package/front_end/core/i18n/locales/ml.json +194 -110
- package/front_end/core/i18n/locales/mn.json +194 -110
- package/front_end/core/i18n/locales/mr.json +193 -109
- package/front_end/core/i18n/locales/ms.json +193 -109
- package/front_end/core/i18n/locales/my.json +198 -114
- package/front_end/core/i18n/locales/ne.json +197 -113
- package/front_end/core/i18n/locales/nl.json +193 -109
- package/front_end/core/i18n/locales/no.json +195 -111
- package/front_end/core/i18n/locales/or.json +197 -113
- package/front_end/core/i18n/locales/pa.json +195 -111
- package/front_end/core/i18n/locales/pl.json +195 -111
- package/front_end/core/i18n/locales/pt-PT.json +195 -111
- package/front_end/core/i18n/locales/pt.json +194 -110
- package/front_end/core/i18n/locales/ro.json +189 -105
- package/front_end/core/i18n/locales/ru.json +191 -107
- package/front_end/core/i18n/locales/si.json +194 -110
- package/front_end/core/i18n/locales/sk.json +192 -108
- package/front_end/core/i18n/locales/sl.json +193 -109
- package/front_end/core/i18n/locales/sq.json +193 -109
- package/front_end/core/i18n/locales/sr-Latn.json +192 -108
- package/front_end/core/i18n/locales/sr.json +192 -108
- package/front_end/core/i18n/locales/sv.json +191 -107
- package/front_end/core/i18n/locales/sw.json +195 -111
- package/front_end/core/i18n/locales/ta.json +193 -109
- package/front_end/core/i18n/locales/te.json +198 -114
- package/front_end/core/i18n/locales/th.json +194 -110
- package/front_end/core/i18n/locales/tr.json +192 -108
- package/front_end/core/i18n/locales/uk.json +192 -108
- package/front_end/core/i18n/locales/ur.json +194 -110
- package/front_end/core/i18n/locales/uz.json +190 -106
- package/front_end/core/i18n/locales/vi.json +195 -111
- package/front_end/core/i18n/locales/zh-HK.json +193 -109
- package/front_end/core/i18n/locales/zh-TW.json +195 -111
- package/front_end/core/i18n/locales/zh.json +194 -110
- package/front_end/core/i18n/locales/zu.json +193 -109
- package/front_end/core/platform/dom-utilities.ts +107 -0
- package/front_end/core/platform/keyboard-utilities.ts +8 -0
- package/front_end/core/platform/string-utilities.ts +10 -0
- package/front_end/core/root/Runtime.ts +0 -2
- package/front_end/core/sdk/CPUProfileDataModel.ts +11 -4
- package/front_end/core/sdk/CPUThrottlingManager.ts +1 -1
- package/front_end/core/sdk/CSSMatchedStyles.ts +11 -12
- package/front_end/core/sdk/ChildTargetManager.ts +1 -1
- package/front_end/core/sdk/ConsoleModel.ts +3 -3
- package/front_end/core/sdk/DOMModel.ts +0 -1
- package/front_end/core/sdk/DebuggerModel.ts +4 -36
- package/front_end/core/sdk/FrameManager.ts +12 -33
- package/front_end/core/sdk/NetworkManager.ts +50 -16
- package/front_end/core/sdk/NetworkRequest.ts +49 -0
- package/front_end/core/sdk/ProfileTreeModel.ts +19 -6
- package/front_end/core/sdk/ResourceTreeModel.ts +31 -32
- package/front_end/core/sdk/RuntimeModel.ts +1 -1
- package/front_end/core/sdk/ScreenCaptureModel.ts +3 -8
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +3 -0
- package/front_end/core/sdk/SourceMap.ts +14 -8
- package/front_end/core/sdk/SourceMapManager.ts +8 -6
- package/front_end/core/sdk/Target.ts +3 -3
- package/front_end/core/sdk/TargetManager.ts +12 -1
- package/front_end/core/sdk/sdk-legacy.ts +3 -0
- package/front_end/core/sdk/sdk-meta.ts +21 -0
- package/front_end/devtools_compatibility.js +17 -13
- package/front_end/entrypoints/formatter_worker/FormatterActions.ts +0 -3
- package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +1 -53
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +1 -0
- package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +0 -9
- package/front_end/entrypoints/formatter_worker/formatter_worker.ts +0 -4
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +5 -3
- package/front_end/entrypoints/js_app/js_app.ts +1 -0
- package/front_end/entrypoints/lighthouse_worker/LighthouseWorkerService.ts +17 -9
- package/front_end/entrypoints/main/ExecutionContextSelector.ts +1 -1
- package/front_end/entrypoints/main/MainImpl.ts +31 -38
- package/front_end/entrypoints/main/main-meta.ts +0 -2
- package/front_end/entrypoints/node_app/node_app.ts +2 -1
- package/front_end/entrypoints/shell/shell.ts +1 -2
- package/front_end/generated/ARIAProperties.js +8 -0
- package/front_end/generated/InspectorBackendCommands.js +32 -23
- package/front_end/generated/SupportedCSSProperties.js +97 -48
- package/front_end/generated/protocol-mapping.d.ts +67 -34
- package/front_end/generated/protocol-proxy-api.d.ts +52 -29
- package/front_end/generated/protocol.ts +344 -89
- package/front_end/legacy/legacy-defs.d.ts +1 -3
- package/front_end/legacy_test_runner/network_test_runner/network_test_runner.js +1 -1
- package/front_end/legacy_test_runner/performance_test_runner/TimelineTestRunner.js +10 -18
- package/front_end/legacy_test_runner/sources_test_runner/DebuggerTestRunner.js +3 -3
- package/front_end/legacy_test_runner/test_runner/TestRunner.js +24 -0
- package/front_end/legacy_test_runner/test_runner/test_runner.js +15 -13
- package/front_end/models/bindings/BreakpointManager.ts +38 -21
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +19 -18
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +4 -0
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +32 -37
- package/front_end/models/bindings/FileUtils.ts +3 -3
- package/front_end/models/bindings/IgnoreListManager.ts +14 -3
- package/front_end/models/bindings/ResourceMapping.ts +5 -28
- package/front_end/models/bindings/ResourceScriptMapping.ts +2 -13
- package/front_end/models/bindings/ResourceUtils.ts +1 -2
- package/front_end/models/emulation/DeviceModeModel.ts +0 -14
- package/front_end/models/extensions/ExtensionAPI.ts +22 -5
- package/front_end/models/extensions/ExtensionServer.ts +31 -14
- package/front_end/models/formatter/FormatterWorkerPool.ts +0 -31
- package/front_end/models/har/HARFormat.ts +68 -5
- package/front_end/models/har/Importer.ts +3 -5
- package/front_end/models/har/Log.ts +3 -0
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +24 -1
- package/front_end/models/issues_manager/DeprecationIssue.ts +112 -32
- package/front_end/models/issues_manager/FederatedAuthRequestIssue.ts +0 -10
- package/front_end/models/issues_manager/IssuesManager.ts +3 -12
- package/front_end/models/issues_manager/descriptions/arPermissionPolicyDisabled.md +5 -6
- package/front_end/models/issues_manager/descriptions/arPermissionPolicyNotDelegated.md +11 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +121 -97
- package/front_end/models/logs/NetworkLog.ts +11 -11
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +5 -1
- package/front_end/models/persistence/NetworkPersistenceManager.ts +13 -5
- package/front_end/models/persistence/PersistenceImpl.ts +2 -1
- package/front_end/models/source_map_scopes/NamesResolver.ts +99 -56
- package/front_end/models/text_utils/TextUtils.ts +18 -34
- package/front_end/models/text_utils/text_utils-legacy.ts +0 -3
- package/front_end/models/timeline_model/TimelineModel.ts +2 -2
- package/front_end/models/timeline_model/timeline_model-legacy.ts +0 -9
- package/front_end/models/timeline_model/timeline_model.ts +0 -3
- package/front_end/panels/accessibility/ARIAAttributesView.ts +2 -1
- package/front_end/panels/application/AppManifestView.ts +15 -7
- package/front_end/panels/application/ApplicationPanelCacheSection.ts +2 -1
- package/front_end/panels/application/ApplicationPanelSidebar.ts +15 -9
- package/front_end/panels/application/DOMStorageModel.ts +16 -18
- package/front_end/panels/application/IndexedDBModel.ts +97 -134
- package/front_end/panels/application/IndexedDBViews.ts +1 -3
- package/front_end/panels/application/InterestGroupStorageModel.ts +3 -0
- package/front_end/panels/application/InterestGroupTreeElement.ts +1 -1
- package/front_end/panels/application/ReportingApiTreeElement.ts +2 -1
- package/front_end/panels/application/ReportingApiView.ts +5 -4
- package/front_end/panels/application/StorageView.ts +30 -26
- package/front_end/panels/application/TrustTokensTreeElement.ts +5 -4
- package/front_end/panels/application/application.ts +6 -0
- package/front_end/panels/application/components/BackForwardCacheStrings.ts +6 -1
- package/front_end/panels/application/components/BackForwardCacheView.ts +149 -92
- package/front_end/panels/application/components/FrameDetailsView.ts +66 -7
- package/front_end/panels/application/components/Prerender2.ts +74 -14
- package/front_end/panels/application/components/ProtocolHandlersView.ts +6 -1
- package/front_end/panels/application/components/SharedStorageAccessGrid.ts +184 -0
- package/front_end/panels/application/components/SharedStorageMetadataView.ts +173 -0
- package/front_end/panels/application/components/backForwardCacheView.css +2 -3
- package/front_end/panels/application/components/components.ts +4 -0
- package/front_end/panels/application/components/frameDetailsReportView.css +1 -1
- package/front_end/panels/application/components/permissionsPolicySection.css +1 -1
- package/front_end/panels/application/components/protocolHandlersView.css +5 -1
- package/front_end/panels/application/components/sharedStorageAccessGrid.css +26 -0
- package/front_end/panels/application/components/sharedStorageMetadataView.css +11 -0
- package/front_end/panels/application/components/stackTraceLinkButton.css +1 -1
- package/front_end/panels/application/components/stackTraceRow.css +1 -1
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +2 -1
- package/front_end/panels/console/ConsoleFormat.ts +2 -2
- package/front_end/panels/console/ConsolePinPane.ts +1 -1
- package/front_end/panels/console/ConsolePrompt.ts +1 -1
- package/front_end/panels/console/ConsoleView.ts +1 -0
- package/front_end/panels/console/ConsoleViewMessage.ts +1 -1
- package/front_end/panels/console/consoleView.css +5 -0
- package/front_end/panels/coverage/CoverageView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewUnusedDeclarations.ts +1 -1
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +6 -24
- package/front_end/panels/developer_resources/developer_resources-meta.ts +1 -1
- package/front_end/panels/elements/CSSRuleValidator.ts +147 -65
- package/front_end/panels/elements/CSSRuleValidatorHelper.ts +32 -2
- package/front_end/panels/elements/ClassesPaneWidget.ts +2 -2
- package/front_end/panels/elements/ElementsPanel.ts +19 -1
- package/front_end/panels/elements/StylePropertiesSection.ts +3 -1
- package/front_end/panels/elements/StylePropertyTreeElement.ts +9 -3
- package/front_end/panels/elements/StylesSidebarPane.ts +46 -19
- package/front_end/panels/elements/components/CSSHintDetailsView.ts +1 -2
- package/front_end/panels/elements/components/CSSPropertyIconResolver.ts +2 -3
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +19 -2
- package/front_end/panels/elements/components/computedStyleProperty.css +3 -3
- package/front_end/panels/elements/components/computedStyleTrace.css +8 -4
- package/front_end/panels/elements/components/cssHintDetailsView.css +2 -8
- package/front_end/panels/elements/elements-meta.ts +28 -0
- package/front_end/panels/elements/stylesSectionTree.css +2 -1
- package/front_end/panels/elements/stylesSidebarPane.css +7 -0
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +2 -0
- package/front_end/panels/issues/IssueView.ts +5 -4
- package/front_end/panels/js_profiler/js_profiler-meta.ts +139 -0
- package/front_end/panels/lighthouse/LighthouseController.ts +4 -9
- package/front_end/panels/lighthouse/LighthousePanel.ts +38 -32
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +16 -15
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +3 -3
- package/front_end/panels/lighthouse/LighthouseReportSelector.ts +6 -1
- package/front_end/panels/lighthouse/LighthouseReporterTypes.ts +3 -2
- package/front_end/panels/lighthouse/LighthouseStartView.ts +162 -89
- package/front_end/panels/lighthouse/lighthouseStartView.css +7 -36
- package/front_end/panels/media/TickingFlameChart.ts +9 -3
- package/front_end/panels/network/NetworkDataGridNode.ts +79 -9
- package/front_end/panels/network/NetworkItemView.ts +4 -3
- package/front_end/panels/network/NetworkLogView.ts +40 -42
- package/front_end/panels/network/NetworkLogViewColumns.ts +2 -1
- package/front_end/panels/network/RequestCookiesView.ts +28 -0
- package/front_end/panels/network/components/HeaderSectionRow.css +176 -0
- package/front_end/panels/network/components/HeaderSectionRow.ts +477 -0
- package/front_end/panels/network/components/RequestHeaderSection.css +59 -0
- package/front_end/panels/network/components/RequestHeaderSection.ts +133 -0
- package/front_end/panels/network/components/RequestHeadersView.css +1 -59
- package/front_end/panels/network/components/RequestHeadersView.ts +43 -417
- package/front_end/panels/network/components/ResponseHeaderSection.css +21 -0
- package/front_end/panels/network/components/ResponseHeaderSection.ts +635 -0
- package/front_end/panels/network/components/components.ts +6 -0
- package/front_end/panels/network/network-meta.ts +0 -16
- package/front_end/panels/network/requestPayloadTree.css +0 -1
- package/front_end/panels/profiler/HeapProfileView.ts +7 -6
- package/front_end/panels/profiler/LiveHeapProfileView.ts +2 -2
- package/front_end/panels/sensors/sensors-meta.ts +0 -10
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +61 -43
- package/front_end/panels/settings/KeybindsSettingsTab.ts +1 -1
- package/front_end/panels/settings/SettingsScreen.ts +1 -3
- package/front_end/panels/settings/components/syncSection.css +1 -1
- package/front_end/panels/settings/frameworkIgnoreListSettingsTab.css +38 -35
- package/front_end/panels/sources/BreakpointsSidebarPane.ts +265 -25
- package/front_end/panels/sources/CallStackSidebarPane.ts +10 -1
- package/front_end/panels/sources/CoveragePlugin.ts +1 -1
- package/front_end/panels/sources/DebuggerPlugin.ts +316 -109
- package/front_end/panels/sources/GoToLineQuickOpen.ts +22 -49
- package/front_end/panels/sources/NavigatorView.ts +2 -10
- package/front_end/panels/sources/OpenFileQuickOpen.ts +0 -13
- package/front_end/panels/sources/OutlineQuickOpen.ts +274 -45
- package/front_end/panels/sources/SourcesNavigator.ts +2 -2
- package/front_end/panels/sources/SourcesPanel.ts +13 -9
- package/front_end/panels/sources/SourcesView.ts +8 -2
- package/front_end/panels/sources/TabbedEditorContainer.ts +8 -0
- package/front_end/panels/sources/UISourceCodeFrame.ts +81 -34
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +3 -2
- package/front_end/panels/sources/components/BreakpointsView.ts +472 -28
- package/front_end/panels/sources/components/BreakpointsViewUtils.ts +195 -0
- package/front_end/panels/sources/components/HeadersView.css +5 -1
- package/front_end/panels/sources/components/HeadersView.ts +18 -11
- package/front_end/panels/sources/components/breakpointsView.css +136 -11
- package/front_end/panels/sources/sources-legacy.ts +0 -5
- package/front_end/panels/sources/sources-meta.ts +113 -4
- package/front_end/panels/sources/sources.ts +0 -2
- package/front_end/panels/sources/watchExpressionsSidebarPane.css +10 -6
- package/front_end/panels/timeline/PerformanceModel.ts +65 -18
- package/front_end/panels/timeline/TimelineController.ts +11 -5
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +3 -49
- package/front_end/panels/timeline/TimelineFlameChartView.ts +1 -1
- package/front_end/panels/timeline/TimelineLoader.ts +41 -24
- package/front_end/panels/timeline/TimelinePanel.ts +155 -57
- package/front_end/panels/timeline/TimelineUIUtils.ts +1 -263
- package/front_end/panels/webauthn/WebauthnPane.ts +2 -2
- package/front_end/panels/webauthn/webauthnPane.css +1 -0
- package/front_end/services/puppeteer/PuppeteerConnection.ts +51 -42
- package/front_end/third_party/additional_readme_paths.json +0 -1
- package/front_end/third_party/chromium/client-variations/ClientVariations.js +1 -1
- package/front_end/third_party/codemirror.next/bundle.ts +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +7 -1
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
- package/front_end/third_party/codemirror.next/package.json +4 -2
- package/front_end/third_party/i18n/localized-string-set.ts +9 -1
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +431 -434
- package/front_end/third_party/lighthouse/locales/en-US.json +144 -186
- package/front_end/third_party/lighthouse/locales/en-XL.json +144 -186
- package/front_end/third_party/puppeteer/README.chromium +14 -6
- package/front_end/third_party/puppeteer/package/README.md +134 -316
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +337 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js +248 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts +148 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.js +135 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +2100 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js +536 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.js +39 -23
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.d.ts +17 -199
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.js +112 -202
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.d.ts +9 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js +5 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ChromeTargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ChromeTargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ChromeTargetManager.js +0 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ChromeTargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Configuration.d.ts +133 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Configuration.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/{esm/puppeteer/initializePuppeteer.d.ts → cjs/puppeteer/common/Configuration.js} +4 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Configuration.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.d.ts +24 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.js +67 -28
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.d.ts +11 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.js +7 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.d.ts +52 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/{DeviceDescriptors.js → Device.js} +17 -11
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ElementHandle.d.ts +29 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ElementHandle.js +69 -46
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.d.ts +27 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.js +47 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.d.ts +16 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.js +16 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.d.ts +2 -36
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.js +20 -59
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FirefoxTargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FirefoxTargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Frame.d.ts +47 -21
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Frame.js +155 -43
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts +7 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js +47 -97
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameTree.d.ts +39 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameTree.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameTree.js +120 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameTree.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/IsolatedWorld.d.ts +13 -67
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/IsolatedWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/IsolatedWorld.js +124 -511
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/IsolatedWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts +5 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js +7 -9
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/{esm/puppeteer/node/install.d.ts → cjs/puppeteer/common/LazyArg.d.ts} +7 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LazyArg.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LazyArg.js +45 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LazyArg.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.js +12 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.d.ts +15 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.js +15 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts +1 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/{esm/puppeteer/node → cjs/puppeteer/common}/NodeWebSocketTransport.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NodeWebSocketTransport.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/{node → common}/NodeWebSocketTransport.js +1 -15
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NodeWebSocketTransport.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.d.ts +35 -496
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.js +287 -414
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/{esm/puppeteer/common/NetworkConditions.d.ts → cjs/puppeteer/common/PredefinedNetworkConditions.d.ts} +13 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PredefinedNetworkConditions.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/{NetworkConditions.js → PredefinedNetworkConditions.js} +12 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PredefinedNetworkConditions.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.d.ts +36 -61
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.js +32 -66
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.d.ts +26 -34
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.js +57 -94
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WaitTask.d.ts +52 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WaitTask.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WaitTask.js +204 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WaitTask.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.d.ts +4 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.js +23 -27
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/Browser.d.ts +45 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/Browser.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/Browser.js +75 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/Browser.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/BrowserContext.d.ts +28 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/BrowserContext.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/BrowserContext.js +52 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/BrowserContext.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/{esm/puppeteer/puppeteer.js → cjs/puppeteer/common/bidi/Connection.d.ts} +20 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/Connection.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/Connection.js +133 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/Connection.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/Page.d.ts +28 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/Page.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/Page.js +61 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/bidi/Page.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/types.d.ts +11 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/types.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.d.ts +0 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.js +25 -59
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/environment.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/environment.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/environment.js +8 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/environment.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.d.ts +8 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.js +8 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/PierceQuerySelector.d.ts +9 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/PierceQuerySelector.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/PierceQuerySelector.js +71 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/PierceQuerySelector.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/Poller.d.ts +32 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/Poller.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/Poller.js +30 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/Poller.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/TextContent.d.ts +39 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/TextContent.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/TextContent.js +133 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/TextContent.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/TextQuerySelector.d.ts +28 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/TextQuerySelector.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/TextQuerySelector.js +80 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/TextQuerySelector.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/XPathQuerySelector.d.ts +24 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/XPathQuerySelector.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/XPathQuerySelector.js +42 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/XPathQuerySelector.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +44 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.js +52 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/util.d.ts +26 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/util.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/util.js +58 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/util.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.d.ts +50 -14
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.js +137 -154
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.d.ts +6 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js +16 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts +6 -18
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +88 -28
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/FirefoxLauncher.d.ts +4 -18
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/FirefoxLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/FirefoxLauncher.js +40 -33
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/FirefoxLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PipeTransport.d.ts +15 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PipeTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PipeTransport.js +1 -16
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PipeTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ProductLauncher.d.ts +24 -22
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ProductLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ProductLauncher.js +94 -130
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ProductLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/{Puppeteer.d.ts → PuppeteerNode.d.ts} +74 -43
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.js +271 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer-core.d.ts +21 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer-core.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer-core.js +22 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer-core.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/types.d.ts +24 -18
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/types.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/types.js +25 -22
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/types.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/DebuggableDeferredPromise.d.ts +9 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/DebuggableDeferredPromise.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/DebuggableDeferredPromise.js +22 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/DebuggableDeferredPromise.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/DeferredPromise.d.ts +12 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/DeferredPromise.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/DeferredPromise.js +17 -44
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/DeferredPromise.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/third_party/mitt/index.d.ts +23 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/third_party/mitt/index.js +5 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +337 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js +244 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts +148 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.js +131 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +2100 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js +532 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js +39 -23
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts +17 -199
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js +108 -198
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts +9 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +4 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ChromeTargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ChromeTargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ChromeTargetManager.js +0 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ChromeTargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Configuration.d.ts +133 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Configuration.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/{cjs/puppeteer/initializePuppeteer.d.ts → esm/puppeteer/common/Configuration.js} +3 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Configuration.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts +24 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.js +63 -26
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts +11 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.js +7 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.d.ts +52 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/{DeviceDescriptors.js → Device.js} +16 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ElementHandle.d.ts +29 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ElementHandle.js +69 -46
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts +27 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.js +47 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.d.ts +16 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.js +16 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts +2 -36
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.js +20 -59
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FirefoxTargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FirefoxTargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Frame.d.ts +47 -21
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Frame.js +132 -43
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts +7 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js +47 -97
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameTree.d.ts +39 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameTree.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameTree.js +116 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameTree.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/IsolatedWorld.d.ts +13 -67
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/IsolatedWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/IsolatedWorld.js +124 -487
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/IsolatedWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts +5 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js +7 -9
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/{cjs/puppeteer/node/install.d.ts → esm/puppeteer/common/LazyArg.d.ts} +7 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LazyArg.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LazyArg.js +41 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LazyArg.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.js +12 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.d.ts +15 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.js +15 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts +1 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/{cjs/puppeteer/node → esm/puppeteer/common}/NodeWebSocketTransport.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NodeWebSocketTransport.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/{node → common}/NodeWebSocketTransport.js +1 -15
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NodeWebSocketTransport.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts +35 -496
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js +287 -414
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/{cjs/puppeteer/common/NetworkConditions.d.ts → esm/puppeteer/common/PredefinedNetworkConditions.d.ts} +13 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PredefinedNetworkConditions.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/{NetworkConditions.js → PredefinedNetworkConditions.js} +11 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PredefinedNetworkConditions.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts +36 -61
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.js +33 -67
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts +26 -34
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.js +57 -94
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WaitTask.d.ts +52 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WaitTask.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WaitTask.js +199 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WaitTask.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts +4 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.js +23 -27
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/Browser.d.ts +45 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/Browser.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/Browser.js +71 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/Browser.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/BrowserContext.d.ts +28 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/BrowserContext.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/BrowserContext.js +48 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/BrowserContext.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/Connection.d.ts +37 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/Connection.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/Connection.js +129 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/Connection.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/Page.d.ts +28 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/Page.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/Page.js +57 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/bidi/Page.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/types.d.ts +11 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/types.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.d.ts +0 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.js +24 -57
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/environment.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/environment.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/environment.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/environment.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.d.ts +8 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.js +8 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/PierceQuerySelector.d.ts +9 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/PierceQuerySelector.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/PierceQuerySelector.js +66 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/PierceQuerySelector.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/Poller.d.ts +32 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/Poller.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/Poller.js +30 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/Poller.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/TextContent.d.ts +39 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/TextContent.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/TextContent.js +128 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/TextContent.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/TextQuerySelector.d.ts +28 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/TextQuerySelector.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/TextQuerySelector.js +75 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/TextQuerySelector.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/XPathQuerySelector.d.ts +24 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/XPathQuerySelector.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/XPathQuerySelector.js +37 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/XPathQuerySelector.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.d.ts +44 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.js +41 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/util.d.ts +26 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/util.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/util.js +53 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/util.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.d.ts +50 -14
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js +137 -154
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts +6 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js +14 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts +6 -18
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +89 -29
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.d.ts +4 -18
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.js +41 -34
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.d.ts +15 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.js +1 -16
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ProductLauncher.d.ts +24 -22
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ProductLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ProductLauncher.js +70 -124
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ProductLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/{Puppeteer.d.ts → PuppeteerNode.d.ts} +74 -43
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.js +267 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/puppeteer-core.d.ts +21 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/puppeteer-core.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/puppeteer-core.js +22 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/puppeteer-core.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/types.d.ts +24 -18
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/types.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/types.js +25 -22
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/types.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/DebuggableDeferredPromise.d.ts +9 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/DebuggableDeferredPromise.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/DebuggableDeferredPromise.js +18 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/DebuggableDeferredPromise.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/DeferredPromise.d.ts +12 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/DeferredPromise.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/DeferredPromise.js +16 -42
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/DeferredPromise.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/third_party/mitt/index.d.ts +23 -0
- package/front_end/third_party/puppeteer/package/lib/esm/third_party/mitt/index.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +548 -513
- package/front_end/third_party/puppeteer/package/package.json +125 -104
- package/front_end/third_party/puppeteer/puppeteer.ts +3 -3
- package/front_end/ui/components/buttons/Button.ts +30 -1
- package/front_end/ui/components/buttons/button.css +21 -0
- package/front_end/ui/components/chrome_link/ChromeLink.ts +3 -2
- package/front_end/ui/components/chrome_link/chromeLink.css +1 -1
- package/front_end/ui/components/code_highlighter/CodeHighlighter.ts +21 -2
- package/front_end/ui/components/docs/button/basic.ts +43 -10
- package/front_end/ui/components/docs/elements_breadcrumbs/basic.ts +2 -0
- package/front_end/ui/components/docs/elements_breadcrumbs/scroll-to-active-element.ts +10 -3
- package/front_end/ui/components/docs/two_states_counter/basic.html +27 -0
- package/front_end/ui/components/docs/two_states_counter/basic.ts +45 -0
- package/front_end/ui/components/expandable_list/expandableList.css +1 -1
- package/front_end/ui/components/helpers/scheduled-render.ts +5 -2
- package/front_end/ui/components/icon_button/iconButton.css +2 -0
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +23 -12
- package/front_end/ui/components/linkifier/linkifierImpl.css +1 -0
- package/front_end/ui/components/markdown_view/MarkdownImage.ts +0 -4
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +4 -0
- package/front_end/ui/components/markdown_view/MarkdownView.ts +39 -38
- package/front_end/ui/components/markdown_view/markdownLink.css +1 -0
- package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +12 -6
- package/front_end/ui/components/survey_link/surveyLink.css +1 -0
- package/front_end/ui/components/text_editor/TextEditor.ts +75 -9
- package/front_end/ui/components/text_editor/config.ts +58 -2
- package/front_end/ui/components/text_editor/position.ts +2 -0
- package/front_end/ui/components/text_editor/theme.ts +10 -0
- package/front_end/ui/components/text_prompt/textPrompt.css +4 -0
- package/front_end/ui/components/tree_outline/TreeOutline.ts +1 -8
- package/front_end/ui/components/tree_outline/treeOutline.css +20 -0
- package/front_end/ui/components/two_states_counter/TwoStatesCounter.ts +103 -0
- package/front_end/ui/components/two_states_counter/twoStatesCounter.css +37 -0
- package/front_end/ui/components/two_states_counter/two_states_counter.ts +9 -0
- package/front_end/ui/legacy/ARIAUtils.ts +4 -1
- package/front_end/ui/legacy/Context.ts +5 -1
- package/front_end/ui/legacy/DockController.ts +19 -0
- package/front_end/ui/legacy/FilterBar.ts +3 -1
- package/front_end/ui/legacy/InspectorView.ts +6 -2
- package/front_end/ui/legacy/ListWidget.ts +5 -1
- package/front_end/ui/legacy/SearchableView.ts +2 -19
- package/front_end/ui/legacy/SoftContextMenu.ts +20 -6
- package/front_end/ui/legacy/TabbedPane.ts +7 -5
- package/front_end/ui/legacy/TextPrompt.ts +1 -2
- package/front_end/ui/legacy/Toolbar.ts +6 -4
- package/front_end/ui/legacy/UIUtils.ts +8 -8
- package/front_end/ui/legacy/XLink.ts +3 -3
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +9 -10
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +7 -6
- package/front_end/ui/legacy/components/inline_editor/CSSAngle.ts +9 -2
- package/front_end/ui/legacy/components/inline_editor/CSSLength.ts +10 -2
- package/front_end/ui/legacy/components/inline_editor/CSSVarSwatch.ts +22 -9
- package/front_end/ui/legacy/components/inline_editor/FontEditor.ts +3 -2
- package/front_end/ui/legacy/components/inline_editor/cssLength.css +4 -0
- package/front_end/ui/legacy/components/object_ui/JavaScriptREPL.ts +15 -9
- package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +9 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +75 -377
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +3 -14
- package/front_end/ui/legacy/components/quick_open/HelpQuickOpen.ts +2 -14
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +9 -41
- package/front_end/ui/legacy/components/utils/Linkifier.ts +7 -2
- package/front_end/ui/legacy/inspectorCommon.css +23 -0
- package/front_end/ui/legacy/inspectorSyntaxHighlight.css +1 -0
- package/front_end/ui/legacy/reportView.css +10 -0
- package/front_end/ui/legacy/softContextMenu.css +11 -1
- package/front_end/ui/legacy/splitWidget.css +1 -1
- package/front_end/ui/legacy/tabbedPane.css +26 -4
- package/front_end/ui/legacy/theme_support/theme_support_impl.ts +3 -5
- package/front_end/ui/legacy/toolbar.css +7 -1
- package/package.json +2 -1
- package/scripts/eslint_rules/lib/no_only.js +27 -0
- package/scripts/eslint_rules/tests/no_only_test.js +95 -0
- package/docs/localization/README.md +0 -6
- package/docs/localization/adding_strings.md +0 -133
- package/docs/localization/descriptions.md +0 -30
- package/docs/localization/localization_apis.md +0 -80
- package/docs/localization/locked_terms.md +0 -38
- package/docs/testing_guidelines.md +0 -4
- package/docs/triage_guidelines.md +0 -3
- package/front_end/entrypoints/formatter_worker/HTMLOutline.ts +0 -53
- package/front_end/entrypoints/formatter_worker/JavaScriptOutline.ts +0 -153
- package/front_end/legacy_test_runner/lighthouse_test_runner/lighthouse_test_runner.js +0 -155
- package/front_end/models/timeline_model/TimelineIRModel.ts +0 -317
- package/front_end/panels/input/InputModel.ts +0 -213
- package/front_end/panels/input/InputTimeline.ts +0 -407
- package/front_end/panels/input/input-legacy.ts +0 -32
- package/front_end/panels/input/input-meta.ts +0 -130
- package/front_end/panels/input/input.ts +0 -11
- package/front_end/panels/input/inputTimeline.css +0 -16
- package/front_end/panels/lighthouse/LighthouseStartViewFR.ts +0 -179
- package/front_end/panels/sources/JavaScriptCompilerPlugin.ts +0 -145
- package/front_end/third_party/acorn-loose/README.chromium +0 -22
- package/front_end/third_party/acorn-loose/acorn-loose-tsconfig.json +0 -8
- package/front_end/third_party/acorn-loose/acorn-loose.ts +0 -9
- package/front_end/third_party/acorn-loose/package/CHANGELOG.md +0 -123
- package/front_end/third_party/acorn-loose/package/LICENSE +0 -21
- package/front_end/third_party/acorn-loose/package/README.md +0 -66
- package/front_end/third_party/acorn-loose/package/dist/acorn-loose.d.ts +0 -16
- package/front_end/third_party/acorn-loose/package/dist/acorn-loose.js +0 -1538
- package/front_end/third_party/acorn-loose/package/dist/acorn-loose.js.map +0 -1
- package/front_end/third_party/acorn-loose/package/dist/acorn-loose.mjs +0 -1528
- package/front_end/third_party/acorn-loose/package/dist/acorn-loose.mjs.d.ts +0 -10
- package/front_end/third_party/acorn-loose/package/dist/acorn-loose.mjs.map +0 -1
- package/front_end/third_party/acorn-loose/package/package.json +0 -47
- package/front_end/third_party/puppeteer/package/LICENSE +0 -202
- package/front_end/third_party/puppeteer/package/install.js +0 -89
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DeviceDescriptors.d.ts +0 -60
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DeviceDescriptors.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DeviceDescriptors.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkConditions.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkConditions.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/compat.d.ts +0 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/compat.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/compat.js +0 -21
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/compat.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/constants.d.ts +0 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/constants.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/constants.js +0 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/constants.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initializePuppeteer.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initializePuppeteer.js +0 -47
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initializePuppeteer.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/NodeWebSocketTransport.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/NodeWebSocketTransport.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.js +0 -213
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/install.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/install.js +0 -198
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/install.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/util.d.ts +0 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/util.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/util.js +0 -40
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/util.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer.d.ts +0 -27
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer.js +0 -44
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/getPackageDirectory.d.ts +0 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/getPackageDirectory.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/getPackageDirectory.js +0 -19
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/getPackageDirectory.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/vendor/mitt/src/index.d.ts +0 -27
- package/front_end/third_party/puppeteer/package/lib/cjs/vendor/mitt/src/index.js +0 -56
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.d.ts +0 -60
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkConditions.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkConditions.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/compat.d.ts +0 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/compat.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/compat.js +0 -20
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/compat.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/constants.d.ts +0 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/constants.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/constants.js +0 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/constants.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initializePuppeteer.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initializePuppeteer.js +0 -43
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initializePuppeteer.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js +0 -209
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/install.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/install.js +0 -190
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/install.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/util.d.ts +0 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/util.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/util.js +0 -13
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/util.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/puppeteer.d.ts +0 -27
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/puppeteer.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/puppeteer.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/getPackageDirectory.d.ts +0 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/getPackageDirectory.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/getPackageDirectory.js +0 -15
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/getPackageDirectory.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/vendor/mitt/src/index.d.ts +0 -27
- package/front_end/third_party/puppeteer/package/lib/esm/vendor/mitt/src/index.js +0 -53
- package/front_end/third_party/puppeteer/package/typescript-if-required.js +0 -70
- package/scripts/eslint_rules/lib/render_coordinator_write.js +0 -58
- package/scripts/eslint_rules/tests/render_coordinator_write_test.js +0 -55
@@ -24,158 +24,111 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
24
24
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
25
25
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
26
26
|
};
|
27
|
-
var
|
28
|
-
import {
|
27
|
+
var _CDPPage_instances, _CDPPage_closed, _CDPPage_client, _CDPPage_target, _CDPPage_keyboard, _CDPPage_mouse, _CDPPage_timeoutSettings, _CDPPage_touchscreen, _CDPPage_accessibility, _CDPPage_frameManager, _CDPPage_emulationManager, _CDPPage_tracing, _CDPPage_pageBindings, _CDPPage_coverage, _CDPPage_javascriptEnabled, _CDPPage_viewport, _CDPPage_screenshotTaskQueue, _CDPPage_workers, _CDPPage_fileChooserPromises, _CDPPage_disconnectPromise, _CDPPage_userDragInterceptionEnabled, _CDPPage_onDetachedFromTarget, _CDPPage_onAttachedToTarget, _CDPPage_initialize, _CDPPage_onFileChooser, _CDPPage_onTargetCrashed, _CDPPage_onLogEntryAdded, _CDPPage_emitMetrics, _CDPPage_buildMetricsObject, _CDPPage_handleException, _CDPPage_onConsoleAPI, _CDPPage_onBindingCalled, _CDPPage_addConsoleMessage, _CDPPage_onDialog, _CDPPage_resetDefaultBackgroundColor, _CDPPage_setTransparentBackgroundColor, _CDPPage_sessionClosePromise, _CDPPage_go, _CDPPage_screenshotTask;
|
28
|
+
import { Page, } from '../api/Page.js';
|
29
29
|
import { assert } from '../util/assert.js';
|
30
|
-
import {
|
30
|
+
import { createDeferredPromise, } from '../util/DeferredPromise.js';
|
31
|
+
import { isErrorLike } from '../util/ErrorLike.js';
|
32
|
+
import { Accessibility } from './Accessibility.js';
|
33
|
+
import { CDPSessionEmittedEvents, isTargetClosedError, } from './Connection.js';
|
31
34
|
import { ConsoleMessage } from './ConsoleMessage.js';
|
32
35
|
import { Coverage } from './Coverage.js';
|
33
36
|
import { Dialog } from './Dialog.js';
|
34
|
-
import { MAIN_WORLD } from './IsolatedWorld.js';
|
35
37
|
import { EmulationManager } from './EmulationManager.js';
|
36
|
-
import { EventEmitter } from './EventEmitter.js';
|
37
38
|
import { FileChooser } from './FileChooser.js';
|
38
39
|
import { FrameManager, FrameManagerEmittedEvents } from './FrameManager.js';
|
39
40
|
import { Keyboard, Mouse, Touchscreen } from './Input.js';
|
41
|
+
import { MAIN_WORLD } from './IsolatedWorld.js';
|
40
42
|
import { NetworkManagerEmittedEvents, } from './NetworkManager.js';
|
41
43
|
import { _paperFormats } from './PDFOptions.js';
|
42
44
|
import { TimeoutSettings } from './TimeoutSettings.js';
|
43
45
|
import { Tracing } from './Tracing.js';
|
44
|
-
import { createJSHandle, debugError, evaluationString, getExceptionMessage,
|
45
|
-
import { isErrorLike } from '../util/ErrorLike.js';
|
46
|
-
import { createDeferredPromiseWithTimer, } from '../util/DeferredPromise.js';
|
46
|
+
import { createJSHandle, debugError, evaluationString, getExceptionMessage, getReadableAsBuffer, getReadableFromProtocolStream, importFS, isNumber, isString, pageBindingDeliverErrorString, pageBindingDeliverErrorValueString, pageBindingDeliverResultString, pageBindingInitString, releaseObject, valueFromRemoteObject, waitForEvent, waitWithTimeout, } from './util.js';
|
47
47
|
import { WebWorker } from './WebWorker.js';
|
48
48
|
/**
|
49
|
-
*
|
50
|
-
* {@link https://developer.chrome.com/extensions/background_pages | extension background page}
|
51
|
-
* in Chromium.
|
52
|
-
*
|
53
|
-
* :::note
|
54
|
-
*
|
55
|
-
* One Browser instance might have multiple Page instances.
|
56
|
-
*
|
57
|
-
* :::
|
58
|
-
*
|
59
|
-
* @example
|
60
|
-
* This example creates a page, navigates it to a URL, and then saves a screenshot:
|
61
|
-
*
|
62
|
-
* ```ts
|
63
|
-
* const puppeteer = require('puppeteer');
|
64
|
-
*
|
65
|
-
* (async () => {
|
66
|
-
* const browser = await puppeteer.launch();
|
67
|
-
* const page = await browser.newPage();
|
68
|
-
* await page.goto('https://example.com');
|
69
|
-
* await page.screenshot({path: 'screenshot.png'});
|
70
|
-
* await browser.close();
|
71
|
-
* })();
|
72
|
-
* ```
|
73
|
-
*
|
74
|
-
* The Page class extends from Puppeteer's {@link EventEmitter} class and will
|
75
|
-
* emit various events which are documented in the {@link PageEmittedEvents} enum.
|
76
|
-
*
|
77
|
-
* @example
|
78
|
-
* This example logs a message for a single page `load` event:
|
79
|
-
*
|
80
|
-
* ```ts
|
81
|
-
* page.once('load', () => console.log('Page loaded!'));
|
82
|
-
* ```
|
83
|
-
*
|
84
|
-
* To unsubscribe from events use the {@link Page.off} method:
|
85
|
-
*
|
86
|
-
* ```ts
|
87
|
-
* function logRequest(interceptedRequest) {
|
88
|
-
* console.log('A request was made:', interceptedRequest.url());
|
89
|
-
* }
|
90
|
-
* page.on('request', logRequest);
|
91
|
-
* // Sometime later...
|
92
|
-
* page.off('request', logRequest);
|
93
|
-
* ```
|
94
|
-
*
|
95
|
-
* @public
|
49
|
+
* @internal
|
96
50
|
*/
|
97
|
-
export class
|
51
|
+
export class CDPPage extends Page {
|
98
52
|
/**
|
99
53
|
* @internal
|
100
54
|
*/
|
101
55
|
constructor(client, target, ignoreHTTPSErrors, screenshotTaskQueue) {
|
102
56
|
super();
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
_Page_onDetachedFromTarget.set(this, (target) => {
|
57
|
+
_CDPPage_instances.add(this);
|
58
|
+
_CDPPage_closed.set(this, false);
|
59
|
+
_CDPPage_client.set(this, void 0);
|
60
|
+
_CDPPage_target.set(this, void 0);
|
61
|
+
_CDPPage_keyboard.set(this, void 0);
|
62
|
+
_CDPPage_mouse.set(this, void 0);
|
63
|
+
_CDPPage_timeoutSettings.set(this, new TimeoutSettings());
|
64
|
+
_CDPPage_touchscreen.set(this, void 0);
|
65
|
+
_CDPPage_accessibility.set(this, void 0);
|
66
|
+
_CDPPage_frameManager.set(this, void 0);
|
67
|
+
_CDPPage_emulationManager.set(this, void 0);
|
68
|
+
_CDPPage_tracing.set(this, void 0);
|
69
|
+
_CDPPage_pageBindings.set(this, new Map());
|
70
|
+
_CDPPage_coverage.set(this, void 0);
|
71
|
+
_CDPPage_javascriptEnabled.set(this, true);
|
72
|
+
_CDPPage_viewport.set(this, void 0);
|
73
|
+
_CDPPage_screenshotTaskQueue.set(this, void 0);
|
74
|
+
_CDPPage_workers.set(this, new Map());
|
75
|
+
_CDPPage_fileChooserPromises.set(this, new Set());
|
76
|
+
_CDPPage_disconnectPromise.set(this, void 0);
|
77
|
+
_CDPPage_userDragInterceptionEnabled.set(this, false);
|
78
|
+
_CDPPage_onDetachedFromTarget.set(this, (target) => {
|
126
79
|
var _a;
|
127
80
|
const sessionId = (_a = target._session()) === null || _a === void 0 ? void 0 : _a.id();
|
128
|
-
__classPrivateFieldGet(this,
|
129
|
-
const worker = __classPrivateFieldGet(this,
|
81
|
+
__classPrivateFieldGet(this, _CDPPage_frameManager, "f").onDetachedFromTarget(target);
|
82
|
+
const worker = __classPrivateFieldGet(this, _CDPPage_workers, "f").get(sessionId);
|
130
83
|
if (!worker) {
|
131
84
|
return;
|
132
85
|
}
|
133
|
-
__classPrivateFieldGet(this,
|
86
|
+
__classPrivateFieldGet(this, _CDPPage_workers, "f").delete(sessionId);
|
134
87
|
this.emit("workerdestroyed" /* PageEmittedEvents.WorkerDestroyed */, worker);
|
135
88
|
});
|
136
|
-
|
137
|
-
__classPrivateFieldGet(this,
|
89
|
+
_CDPPage_onAttachedToTarget.set(this, async (createdTarget) => {
|
90
|
+
__classPrivateFieldGet(this, _CDPPage_frameManager, "f").onAttachedToTarget(createdTarget);
|
138
91
|
if (createdTarget._getTargetInfo().type === 'worker') {
|
139
92
|
const session = createdTarget._session();
|
140
93
|
assert(session);
|
141
|
-
const worker = new WebWorker(session, createdTarget.url(), __classPrivateFieldGet(this,
|
142
|
-
__classPrivateFieldGet(this,
|
94
|
+
const worker = new WebWorker(session, createdTarget.url(), __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_addConsoleMessage).bind(this), __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_handleException).bind(this));
|
95
|
+
__classPrivateFieldGet(this, _CDPPage_workers, "f").set(session.id(), worker);
|
143
96
|
this.emit("workercreated" /* PageEmittedEvents.WorkerCreated */, worker);
|
144
97
|
}
|
145
98
|
if (createdTarget._session()) {
|
146
|
-
__classPrivateFieldGet(this,
|
99
|
+
__classPrivateFieldGet(this, _CDPPage_target, "f")
|
147
100
|
._targetManager()
|
148
|
-
.addTargetInterceptor(createdTarget._session(), __classPrivateFieldGet(this,
|
101
|
+
.addTargetInterceptor(createdTarget._session(), __classPrivateFieldGet(this, _CDPPage_onAttachedToTarget, "f"));
|
149
102
|
}
|
150
103
|
});
|
151
|
-
__classPrivateFieldSet(this,
|
152
|
-
__classPrivateFieldSet(this,
|
153
|
-
__classPrivateFieldSet(this,
|
154
|
-
__classPrivateFieldSet(this,
|
155
|
-
__classPrivateFieldSet(this,
|
156
|
-
__classPrivateFieldSet(this,
|
157
|
-
__classPrivateFieldSet(this,
|
158
|
-
__classPrivateFieldSet(this,
|
159
|
-
__classPrivateFieldSet(this,
|
160
|
-
__classPrivateFieldSet(this,
|
161
|
-
__classPrivateFieldSet(this,
|
162
|
-
__classPrivateFieldSet(this,
|
163
|
-
__classPrivateFieldGet(this,
|
104
|
+
__classPrivateFieldSet(this, _CDPPage_client, client, "f");
|
105
|
+
__classPrivateFieldSet(this, _CDPPage_target, target, "f");
|
106
|
+
__classPrivateFieldSet(this, _CDPPage_keyboard, new Keyboard(client), "f");
|
107
|
+
__classPrivateFieldSet(this, _CDPPage_mouse, new Mouse(client, __classPrivateFieldGet(this, _CDPPage_keyboard, "f")), "f");
|
108
|
+
__classPrivateFieldSet(this, _CDPPage_touchscreen, new Touchscreen(client, __classPrivateFieldGet(this, _CDPPage_keyboard, "f")), "f");
|
109
|
+
__classPrivateFieldSet(this, _CDPPage_accessibility, new Accessibility(client), "f");
|
110
|
+
__classPrivateFieldSet(this, _CDPPage_frameManager, new FrameManager(client, this, ignoreHTTPSErrors, __classPrivateFieldGet(this, _CDPPage_timeoutSettings, "f")), "f");
|
111
|
+
__classPrivateFieldSet(this, _CDPPage_emulationManager, new EmulationManager(client), "f");
|
112
|
+
__classPrivateFieldSet(this, _CDPPage_tracing, new Tracing(client), "f");
|
113
|
+
__classPrivateFieldSet(this, _CDPPage_coverage, new Coverage(client), "f");
|
114
|
+
__classPrivateFieldSet(this, _CDPPage_screenshotTaskQueue, screenshotTaskQueue, "f");
|
115
|
+
__classPrivateFieldSet(this, _CDPPage_viewport, null, "f");
|
116
|
+
__classPrivateFieldGet(this, _CDPPage_target, "f")
|
164
117
|
._targetManager()
|
165
|
-
.addTargetInterceptor(__classPrivateFieldGet(this,
|
166
|
-
__classPrivateFieldGet(this,
|
118
|
+
.addTargetInterceptor(__classPrivateFieldGet(this, _CDPPage_client, "f"), __classPrivateFieldGet(this, _CDPPage_onAttachedToTarget, "f"));
|
119
|
+
__classPrivateFieldGet(this, _CDPPage_target, "f")
|
167
120
|
._targetManager()
|
168
|
-
.on("targetGone" /* TargetManagerEmittedEvents.TargetGone */, __classPrivateFieldGet(this,
|
169
|
-
__classPrivateFieldGet(this,
|
121
|
+
.on("targetGone" /* TargetManagerEmittedEvents.TargetGone */, __classPrivateFieldGet(this, _CDPPage_onDetachedFromTarget, "f"));
|
122
|
+
__classPrivateFieldGet(this, _CDPPage_frameManager, "f").on(FrameManagerEmittedEvents.FrameAttached, event => {
|
170
123
|
return this.emit("frameattached" /* PageEmittedEvents.FrameAttached */, event);
|
171
124
|
});
|
172
|
-
__classPrivateFieldGet(this,
|
125
|
+
__classPrivateFieldGet(this, _CDPPage_frameManager, "f").on(FrameManagerEmittedEvents.FrameDetached, event => {
|
173
126
|
return this.emit("framedetached" /* PageEmittedEvents.FrameDetached */, event);
|
174
127
|
});
|
175
|
-
__classPrivateFieldGet(this,
|
128
|
+
__classPrivateFieldGet(this, _CDPPage_frameManager, "f").on(FrameManagerEmittedEvents.FrameNavigated, event => {
|
176
129
|
return this.emit("framenavigated" /* PageEmittedEvents.FrameNavigated */, event);
|
177
130
|
});
|
178
|
-
const networkManager = __classPrivateFieldGet(this,
|
131
|
+
const networkManager = __classPrivateFieldGet(this, _CDPPage_frameManager, "f").networkManager;
|
179
132
|
networkManager.on(NetworkManagerEmittedEvents.Request, event => {
|
180
133
|
return this.emit("request" /* PageEmittedEvents.Request */, event);
|
181
134
|
});
|
@@ -198,48 +151,58 @@ export class Page extends EventEmitter {
|
|
198
151
|
return this.emit("load" /* PageEmittedEvents.Load */);
|
199
152
|
});
|
200
153
|
client.on('Runtime.consoleAPICalled', event => {
|
201
|
-
return __classPrivateFieldGet(this,
|
154
|
+
return __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_onConsoleAPI).call(this, event);
|
202
155
|
});
|
203
156
|
client.on('Runtime.bindingCalled', event => {
|
204
|
-
return __classPrivateFieldGet(this,
|
157
|
+
return __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_onBindingCalled).call(this, event);
|
205
158
|
});
|
206
159
|
client.on('Page.javascriptDialogOpening', event => {
|
207
|
-
return __classPrivateFieldGet(this,
|
160
|
+
return __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_onDialog).call(this, event);
|
208
161
|
});
|
209
162
|
client.on('Runtime.exceptionThrown', exception => {
|
210
|
-
return __classPrivateFieldGet(this,
|
163
|
+
return __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_handleException).call(this, exception.exceptionDetails);
|
211
164
|
});
|
212
165
|
client.on('Inspector.targetCrashed', () => {
|
213
|
-
return __classPrivateFieldGet(this,
|
166
|
+
return __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_onTargetCrashed).call(this);
|
214
167
|
});
|
215
168
|
client.on('Performance.metrics', event => {
|
216
|
-
return __classPrivateFieldGet(this,
|
169
|
+
return __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_emitMetrics).call(this, event);
|
217
170
|
});
|
218
171
|
client.on('Log.entryAdded', event => {
|
219
|
-
return __classPrivateFieldGet(this,
|
172
|
+
return __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_onLogEntryAdded).call(this, event);
|
220
173
|
});
|
221
174
|
client.on('Page.fileChooserOpened', event => {
|
222
|
-
return __classPrivateFieldGet(this,
|
175
|
+
return __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_onFileChooser).call(this, event);
|
223
176
|
});
|
224
|
-
__classPrivateFieldGet(this,
|
225
|
-
__classPrivateFieldGet(this,
|
177
|
+
__classPrivateFieldGet(this, _CDPPage_target, "f")._isClosedPromise.then(() => {
|
178
|
+
__classPrivateFieldGet(this, _CDPPage_target, "f")
|
226
179
|
._targetManager()
|
227
|
-
.removeTargetInterceptor(__classPrivateFieldGet(this,
|
228
|
-
__classPrivateFieldGet(this,
|
180
|
+
.removeTargetInterceptor(__classPrivateFieldGet(this, _CDPPage_client, "f"), __classPrivateFieldGet(this, _CDPPage_onAttachedToTarget, "f"));
|
181
|
+
__classPrivateFieldGet(this, _CDPPage_target, "f")
|
229
182
|
._targetManager()
|
230
|
-
.off("targetGone" /* TargetManagerEmittedEvents.TargetGone */, __classPrivateFieldGet(this,
|
183
|
+
.off("targetGone" /* TargetManagerEmittedEvents.TargetGone */, __classPrivateFieldGet(this, _CDPPage_onDetachedFromTarget, "f"));
|
231
184
|
this.emit("close" /* PageEmittedEvents.Close */);
|
232
|
-
__classPrivateFieldSet(this,
|
185
|
+
__classPrivateFieldSet(this, _CDPPage_closed, true, "f");
|
233
186
|
});
|
234
187
|
}
|
235
188
|
/**
|
236
189
|
* @internal
|
237
190
|
*/
|
238
191
|
static async _create(client, target, ignoreHTTPSErrors, defaultViewport, screenshotTaskQueue) {
|
239
|
-
const page = new
|
240
|
-
await __classPrivateFieldGet(page,
|
192
|
+
const page = new CDPPage(client, target, ignoreHTTPSErrors, screenshotTaskQueue);
|
193
|
+
await __classPrivateFieldGet(page, _CDPPage_instances, "m", _CDPPage_initialize).call(page);
|
241
194
|
if (defaultViewport) {
|
242
|
-
|
195
|
+
try {
|
196
|
+
await page.setViewport(defaultViewport);
|
197
|
+
}
|
198
|
+
catch (err) {
|
199
|
+
if (isErrorLike(err) && isTargetClosedError(err)) {
|
200
|
+
debugError(err);
|
201
|
+
}
|
202
|
+
else {
|
203
|
+
throw err;
|
204
|
+
}
|
205
|
+
}
|
243
206
|
}
|
244
207
|
return page;
|
245
208
|
}
|
@@ -247,48 +210,13 @@ export class Page extends EventEmitter {
|
|
247
210
|
* @returns `true` if drag events are being intercepted, `false` otherwise.
|
248
211
|
*/
|
249
212
|
isDragInterceptionEnabled() {
|
250
|
-
return __classPrivateFieldGet(this,
|
213
|
+
return __classPrivateFieldGet(this, _CDPPage_userDragInterceptionEnabled, "f");
|
251
214
|
}
|
252
215
|
/**
|
253
216
|
* @returns `true` if the page has JavaScript enabled, `false` otherwise.
|
254
217
|
*/
|
255
218
|
isJavaScriptEnabled() {
|
256
|
-
return __classPrivateFieldGet(this,
|
257
|
-
}
|
258
|
-
/**
|
259
|
-
* Listen to page events.
|
260
|
-
*
|
261
|
-
* :::note
|
262
|
-
*
|
263
|
-
* This method exists to define event typings and handle proper wireup of
|
264
|
-
* cooperative request interception. Actual event listening and dispatching is
|
265
|
-
* delegated to {@link EventEmitter}.
|
266
|
-
*
|
267
|
-
* :::
|
268
|
-
*/
|
269
|
-
on(eventName, handler) {
|
270
|
-
if (eventName === 'request') {
|
271
|
-
const wrap = __classPrivateFieldGet(this, _Page_handlerMap, "f").get(handler) ||
|
272
|
-
((event) => {
|
273
|
-
event.enqueueInterceptAction(() => {
|
274
|
-
return handler(event);
|
275
|
-
});
|
276
|
-
});
|
277
|
-
__classPrivateFieldGet(this, _Page_handlerMap, "f").set(handler, wrap);
|
278
|
-
return super.on(eventName, wrap);
|
279
|
-
}
|
280
|
-
return super.on(eventName, handler);
|
281
|
-
}
|
282
|
-
once(eventName, handler) {
|
283
|
-
// Note: this method only exists to define the types; we delegate the impl
|
284
|
-
// to EventEmitter.
|
285
|
-
return super.once(eventName, handler);
|
286
|
-
}
|
287
|
-
off(eventName, handler) {
|
288
|
-
if (eventName === 'request') {
|
289
|
-
handler = __classPrivateFieldGet(this, _Page_handlerMap, "f").get(handler) || handler;
|
290
|
-
}
|
291
|
-
return super.off(eventName, handler);
|
219
|
+
return __classPrivateFieldGet(this, _CDPPage_javascriptEnabled, "f");
|
292
220
|
}
|
293
221
|
/**
|
294
222
|
* This method is typically coupled with an action that triggers file
|
@@ -318,17 +246,26 @@ export class Page extends EventEmitter {
|
|
318
246
|
* await fileChooser.accept(['/tmp/myfile.pdf']);
|
319
247
|
* ```
|
320
248
|
*/
|
321
|
-
|
322
|
-
|
323
|
-
|
249
|
+
waitForFileChooser(options = {}) {
|
250
|
+
const needsEnable = __classPrivateFieldGet(this, _CDPPage_fileChooserPromises, "f").size === 0;
|
251
|
+
const { timeout = __classPrivateFieldGet(this, _CDPPage_timeoutSettings, "f").timeout() } = options;
|
252
|
+
const promise = createDeferredPromise({
|
253
|
+
message: `Waiting for \`FileChooser\` failed: ${timeout}ms exceeded`,
|
254
|
+
timeout,
|
255
|
+
});
|
256
|
+
__classPrivateFieldGet(this, _CDPPage_fileChooserPromises, "f").add(promise);
|
257
|
+
let enablePromise;
|
258
|
+
if (needsEnable) {
|
259
|
+
enablePromise = __classPrivateFieldGet(this, _CDPPage_client, "f").send('Page.setInterceptFileChooserDialog', {
|
324
260
|
enabled: true,
|
325
261
|
});
|
326
262
|
}
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
263
|
+
return Promise.all([promise, enablePromise])
|
264
|
+
.then(([result]) => {
|
265
|
+
return result;
|
266
|
+
})
|
267
|
+
.catch(error => {
|
268
|
+
__classPrivateFieldGet(this, _CDPPage_fileChooserPromises, "f").delete(promise);
|
332
269
|
throw error;
|
333
270
|
});
|
334
271
|
}
|
@@ -356,7 +293,7 @@ export class Page extends EventEmitter {
|
|
356
293
|
if (accuracy < 0) {
|
357
294
|
throw new Error(`Invalid accuracy "${accuracy}": precondition 0 <= ACCURACY failed.`);
|
358
295
|
}
|
359
|
-
await __classPrivateFieldGet(this,
|
296
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.setGeolocationOverride', {
|
360
297
|
longitude,
|
361
298
|
latitude,
|
362
299
|
accuracy,
|
@@ -366,25 +303,25 @@ export class Page extends EventEmitter {
|
|
366
303
|
* @returns A target this page was created from.
|
367
304
|
*/
|
368
305
|
target() {
|
369
|
-
return __classPrivateFieldGet(this,
|
306
|
+
return __classPrivateFieldGet(this, _CDPPage_target, "f");
|
370
307
|
}
|
371
308
|
/**
|
372
309
|
* @internal
|
373
310
|
*/
|
374
311
|
_client() {
|
375
|
-
return __classPrivateFieldGet(this,
|
312
|
+
return __classPrivateFieldGet(this, _CDPPage_client, "f");
|
376
313
|
}
|
377
314
|
/**
|
378
315
|
* Get the browser the page belongs to.
|
379
316
|
*/
|
380
317
|
browser() {
|
381
|
-
return __classPrivateFieldGet(this,
|
318
|
+
return __classPrivateFieldGet(this, _CDPPage_target, "f").browser();
|
382
319
|
}
|
383
320
|
/**
|
384
321
|
* Get the browser context that the page belongs to.
|
385
322
|
*/
|
386
323
|
browserContext() {
|
387
|
-
return __classPrivateFieldGet(this,
|
324
|
+
return __classPrivateFieldGet(this, _CDPPage_target, "f").browserContext();
|
388
325
|
}
|
389
326
|
/**
|
390
327
|
* @returns The page's main frame.
|
@@ -393,28 +330,28 @@ export class Page extends EventEmitter {
|
|
393
330
|
* Page is guaranteed to have a main frame which persists during navigations.
|
394
331
|
*/
|
395
332
|
mainFrame() {
|
396
|
-
return __classPrivateFieldGet(this,
|
333
|
+
return __classPrivateFieldGet(this, _CDPPage_frameManager, "f").mainFrame();
|
397
334
|
}
|
398
335
|
get keyboard() {
|
399
|
-
return __classPrivateFieldGet(this,
|
336
|
+
return __classPrivateFieldGet(this, _CDPPage_keyboard, "f");
|
400
337
|
}
|
401
338
|
get touchscreen() {
|
402
|
-
return __classPrivateFieldGet(this,
|
339
|
+
return __classPrivateFieldGet(this, _CDPPage_touchscreen, "f");
|
403
340
|
}
|
404
341
|
get coverage() {
|
405
|
-
return __classPrivateFieldGet(this,
|
342
|
+
return __classPrivateFieldGet(this, _CDPPage_coverage, "f");
|
406
343
|
}
|
407
344
|
get tracing() {
|
408
|
-
return __classPrivateFieldGet(this,
|
345
|
+
return __classPrivateFieldGet(this, _CDPPage_tracing, "f");
|
409
346
|
}
|
410
347
|
get accessibility() {
|
411
|
-
return __classPrivateFieldGet(this,
|
348
|
+
return __classPrivateFieldGet(this, _CDPPage_accessibility, "f");
|
412
349
|
}
|
413
350
|
/**
|
414
351
|
* @returns An array of all frames attached to the page.
|
415
352
|
*/
|
416
353
|
frames() {
|
417
|
-
return __classPrivateFieldGet(this,
|
354
|
+
return __classPrivateFieldGet(this, _CDPPage_frameManager, "f").frames();
|
418
355
|
}
|
419
356
|
/**
|
420
357
|
* @returns all of the dedicated {@link
|
@@ -425,7 +362,7 @@ export class Page extends EventEmitter {
|
|
425
362
|
* This does not contain ServiceWorkers
|
426
363
|
*/
|
427
364
|
workers() {
|
428
|
-
return Array.from(__classPrivateFieldGet(this,
|
365
|
+
return Array.from(__classPrivateFieldGet(this, _CDPPage_workers, "f").values());
|
429
366
|
}
|
430
367
|
/**
|
431
368
|
* Activating request interception enables {@link HTTPRequest.abort},
|
@@ -466,7 +403,7 @@ export class Page extends EventEmitter {
|
|
466
403
|
* @param value - Whether to enable request interception.
|
467
404
|
*/
|
468
405
|
async setRequestInterception(value) {
|
469
|
-
return __classPrivateFieldGet(this,
|
406
|
+
return __classPrivateFieldGet(this, _CDPPage_frameManager, "f").networkManager.setRequestInterception(value);
|
470
407
|
}
|
471
408
|
/**
|
472
409
|
* @param enabled - Whether to enable drag interception.
|
@@ -477,44 +414,14 @@ export class Page extends EventEmitter {
|
|
477
414
|
* on the page, which can then be used to simulate drag-and-drop.
|
478
415
|
*/
|
479
416
|
async setDragInterception(enabled) {
|
480
|
-
__classPrivateFieldSet(this,
|
481
|
-
return __classPrivateFieldGet(this,
|
417
|
+
__classPrivateFieldSet(this, _CDPPage_userDragInterceptionEnabled, enabled, "f");
|
418
|
+
return __classPrivateFieldGet(this, _CDPPage_client, "f").send('Input.setInterceptDrags', { enabled });
|
482
419
|
}
|
483
|
-
/**
|
484
|
-
* @param enabled - When `true`, enables offline mode for the page.
|
485
|
-
* @remarks
|
486
|
-
* NOTE: while this method sets the network connection to offline, it does
|
487
|
-
* not change the parameters used in [page.emulateNetworkConditions(networkConditions)]
|
488
|
-
* (#pageemulatenetworkconditionsnetworkconditions)
|
489
|
-
*/
|
490
420
|
setOfflineMode(enabled) {
|
491
|
-
return __classPrivateFieldGet(this,
|
421
|
+
return __classPrivateFieldGet(this, _CDPPage_frameManager, "f").networkManager.setOfflineMode(enabled);
|
492
422
|
}
|
493
|
-
/**
|
494
|
-
* @param networkConditions - Passing `null` disables network condition emulation.
|
495
|
-
* @example
|
496
|
-
*
|
497
|
-
* ```ts
|
498
|
-
* const puppeteer = require('puppeteer');
|
499
|
-
* const slow3G = puppeteer.networkConditions['Slow 3G'];
|
500
|
-
*
|
501
|
-
* (async () => {
|
502
|
-
* const browser = await puppeteer.launch();
|
503
|
-
* const page = await browser.newPage();
|
504
|
-
* await page.emulateNetworkConditions(slow3G);
|
505
|
-
* await page.goto('https://www.google.com');
|
506
|
-
* // other actions...
|
507
|
-
* await browser.close();
|
508
|
-
* })();
|
509
|
-
* ```
|
510
|
-
*
|
511
|
-
* @remarks
|
512
|
-
* NOTE: This does not affect WebSockets and WebRTC PeerConnections (see
|
513
|
-
* https://crbug.com/563644). To set the page offline, you can use
|
514
|
-
* [page.setOfflineMode(enabled)](#pagesetofflinemodeenabled).
|
515
|
-
*/
|
516
423
|
emulateNetworkConditions(networkConditions) {
|
517
|
-
return __classPrivateFieldGet(this,
|
424
|
+
return __classPrivateFieldGet(this, _CDPPage_frameManager, "f").networkManager.emulateNetworkConditions(networkConditions);
|
518
425
|
}
|
519
426
|
/**
|
520
427
|
* This setting will change the default maximum navigation time for the
|
@@ -534,13 +441,19 @@ export class Page extends EventEmitter {
|
|
534
441
|
* @param timeout - Maximum navigation time in milliseconds.
|
535
442
|
*/
|
536
443
|
setDefaultNavigationTimeout(timeout) {
|
537
|
-
__classPrivateFieldGet(this,
|
444
|
+
__classPrivateFieldGet(this, _CDPPage_timeoutSettings, "f").setDefaultNavigationTimeout(timeout);
|
538
445
|
}
|
539
446
|
/**
|
540
447
|
* @param timeout - Maximum time in milliseconds.
|
541
448
|
*/
|
542
449
|
setDefaultTimeout(timeout) {
|
543
|
-
__classPrivateFieldGet(this,
|
450
|
+
__classPrivateFieldGet(this, _CDPPage_timeoutSettings, "f").setDefaultTimeout(timeout);
|
451
|
+
}
|
452
|
+
/**
|
453
|
+
* @returns Maximum time in milliseconds.
|
454
|
+
*/
|
455
|
+
getDefaultTimeout() {
|
456
|
+
return __classPrivateFieldGet(this, _CDPPage_timeoutSettings, "f").timeout();
|
544
457
|
}
|
545
458
|
/**
|
546
459
|
* Runs `document.querySelector` within the page. If no element matches the
|
@@ -628,11 +541,6 @@ export class Page extends EventEmitter {
|
|
628
541
|
* This method iterates the JavaScript heap and finds all objects with the
|
629
542
|
* given prototype.
|
630
543
|
*
|
631
|
-
* @remarks
|
632
|
-
* Shortcut for
|
633
|
-
* {@link ExecutionContext.queryObjects |
|
634
|
-
* page.mainFrame().executionContext().queryObjects(prototypeHandle)}.
|
635
|
-
*
|
636
544
|
* @example
|
637
545
|
*
|
638
546
|
* ```ts
|
@@ -654,7 +562,13 @@ export class Page extends EventEmitter {
|
|
654
562
|
*/
|
655
563
|
async queryObjects(prototypeHandle) {
|
656
564
|
const context = await this.mainFrame().executionContext();
|
657
|
-
|
565
|
+
assert(!prototypeHandle.disposed, 'Prototype JSHandle is disposed!');
|
566
|
+
const remoteObject = prototypeHandle.remoteObject();
|
567
|
+
assert(remoteObject.objectId, 'Prototype JSHandle must not be referencing primitive value');
|
568
|
+
const response = await context._client.send('Runtime.queryObjects', {
|
569
|
+
prototypeObjectId: remoteObject.objectId,
|
570
|
+
});
|
571
|
+
return createJSHandle(context, response.objects);
|
658
572
|
}
|
659
573
|
/**
|
660
574
|
* This method runs `document.querySelector` within the page and passes the
|
@@ -804,7 +718,7 @@ export class Page extends EventEmitter {
|
|
804
718
|
* URL. If URLs are specified, only cookies for those URLs are returned.
|
805
719
|
*/
|
806
720
|
async cookies(...urls) {
|
807
|
-
const originalCookies = (await __classPrivateFieldGet(this,
|
721
|
+
const originalCookies = (await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Network.getCookies', {
|
808
722
|
urls: urls.length ? urls : [this.url()],
|
809
723
|
})).cookies;
|
810
724
|
const unsupportedCookieAttributes = ['priority'];
|
@@ -823,7 +737,7 @@ export class Page extends EventEmitter {
|
|
823
737
|
if (!cookie.url && pageURL.startsWith('http')) {
|
824
738
|
item.url = pageURL;
|
825
739
|
}
|
826
|
-
await __classPrivateFieldGet(this,
|
740
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Network.deleteCookies', item);
|
827
741
|
}
|
828
742
|
}
|
829
743
|
/**
|
@@ -847,7 +761,7 @@ export class Page extends EventEmitter {
|
|
847
761
|
});
|
848
762
|
await this.deleteCookie(...items);
|
849
763
|
if (items.length) {
|
850
|
-
await __classPrivateFieldGet(this,
|
764
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Network.setCookies', { cookies: items });
|
851
765
|
}
|
852
766
|
}
|
853
767
|
/**
|
@@ -857,18 +771,13 @@ export class Page extends EventEmitter {
|
|
857
771
|
* Shortcut for
|
858
772
|
* {@link Frame.addScriptTag | page.mainFrame().addScriptTag(options)}.
|
859
773
|
*
|
860
|
-
* @
|
861
|
-
*
|
774
|
+
* @param options - Options for the script.
|
775
|
+
* @returns An {@link ElementHandle | element handle} to the injected
|
776
|
+
* `<script>` element.
|
862
777
|
*/
|
863
778
|
async addScriptTag(options) {
|
864
779
|
return this.mainFrame().addScriptTag(options);
|
865
780
|
}
|
866
|
-
/**
|
867
|
-
* Adds a `<link rel="stylesheet">` tag into the page with the desired URL or a
|
868
|
-
* `<style type="text/css">` tag with the content.
|
869
|
-
* @returns Promise which resolves to the added tag when the stylesheet's
|
870
|
-
* onload fires or when the CSS content was injected into frame.
|
871
|
-
*/
|
872
781
|
async addStyleTag(options) {
|
873
782
|
return this.mainFrame().addStyleTag(options);
|
874
783
|
}
|
@@ -943,7 +852,7 @@ export class Page extends EventEmitter {
|
|
943
852
|
* context.
|
944
853
|
*/
|
945
854
|
async exposeFunction(name, pptrFunction) {
|
946
|
-
if (__classPrivateFieldGet(this,
|
855
|
+
if (__classPrivateFieldGet(this, _CDPPage_pageBindings, "f").has(name)) {
|
947
856
|
throw new Error(`Failed to add page binding with name ${name}: window['${name}'] already exists!`);
|
948
857
|
}
|
949
858
|
let exposedFunction;
|
@@ -955,10 +864,10 @@ export class Page extends EventEmitter {
|
|
955
864
|
exposedFunction = pptrFunction.default;
|
956
865
|
break;
|
957
866
|
}
|
958
|
-
__classPrivateFieldGet(this,
|
867
|
+
__classPrivateFieldGet(this, _CDPPage_pageBindings, "f").set(name, exposedFunction);
|
959
868
|
const expression = pageBindingInitString('exposedFun', name);
|
960
|
-
await __classPrivateFieldGet(this,
|
961
|
-
await __classPrivateFieldGet(this,
|
869
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Runtime.addBinding', { name: name });
|
870
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Page.addScriptToEvaluateOnNewDocument', {
|
962
871
|
source: expression,
|
963
872
|
});
|
964
873
|
await Promise.all(this.frames().map(frame => {
|
@@ -972,7 +881,7 @@ export class Page extends EventEmitter {
|
|
972
881
|
* To disable authentication, pass `null`.
|
973
882
|
*/
|
974
883
|
async authenticate(credentials) {
|
975
|
-
return __classPrivateFieldGet(this,
|
884
|
+
return __classPrivateFieldGet(this, _CDPPage_frameManager, "f").networkManager.authenticate(credentials);
|
976
885
|
}
|
977
886
|
/**
|
978
887
|
* The extra HTTP headers will be sent with every request the page initiates.
|
@@ -995,7 +904,7 @@ export class Page extends EventEmitter {
|
|
995
904
|
* with every request. All header values must be strings.
|
996
905
|
*/
|
997
906
|
async setExtraHTTPHeaders(headers) {
|
998
|
-
return __classPrivateFieldGet(this,
|
907
|
+
return __classPrivateFieldGet(this, _CDPPage_frameManager, "f").networkManager.setExtraHTTPHeaders(headers);
|
999
908
|
}
|
1000
909
|
/**
|
1001
910
|
* @param userAgent - Specific user agent to use in this page
|
@@ -1004,7 +913,7 @@ export class Page extends EventEmitter {
|
|
1004
913
|
* @returns Promise which resolves when the user agent is set.
|
1005
914
|
*/
|
1006
915
|
async setUserAgent(userAgent, userAgentMetadata) {
|
1007
|
-
return __classPrivateFieldGet(this,
|
916
|
+
return __classPrivateFieldGet(this, _CDPPage_frameManager, "f").networkManager.setUserAgent(userAgent, userAgentMetadata);
|
1008
917
|
}
|
1009
918
|
/**
|
1010
919
|
* @returns Object containing metrics as key/value pairs.
|
@@ -1041,8 +950,8 @@ export class Page extends EventEmitter {
|
|
1041
950
|
* in seconds since an arbitrary point in the past.
|
1042
951
|
*/
|
1043
952
|
async metrics() {
|
1044
|
-
const response = await __classPrivateFieldGet(this,
|
1045
|
-
return __classPrivateFieldGet(this,
|
953
|
+
const response = await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Performance.getMetrics');
|
954
|
+
return __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_buildMetricsObject).call(this, response.metrics);
|
1046
955
|
}
|
1047
956
|
/**
|
1048
957
|
*
|
@@ -1054,7 +963,7 @@ export class Page extends EventEmitter {
|
|
1054
963
|
return this.mainFrame().url();
|
1055
964
|
}
|
1056
965
|
async content() {
|
1057
|
-
return await __classPrivateFieldGet(this,
|
966
|
+
return await __classPrivateFieldGet(this, _CDPPage_frameManager, "f").mainFrame().content();
|
1058
967
|
}
|
1059
968
|
/**
|
1060
969
|
* @param html - HTML markup to assign to the page.
|
@@ -1081,7 +990,7 @@ export class Page extends EventEmitter {
|
|
1081
990
|
* no more than 2 network connections for at least `500` ms.
|
1082
991
|
*/
|
1083
992
|
async setContent(html, options = {}) {
|
1084
|
-
await __classPrivateFieldGet(this,
|
993
|
+
await __classPrivateFieldGet(this, _CDPPage_frameManager, "f").mainFrame().setContent(html, options);
|
1085
994
|
}
|
1086
995
|
/**
|
1087
996
|
* @param url - URL to navigate page to. The URL should include scheme, e.g.
|
@@ -1138,7 +1047,7 @@ export class Page extends EventEmitter {
|
|
1138
1047
|
* Shortcut for {@link Frame.goto | page.mainFrame().goto(url, options)}.
|
1139
1048
|
*/
|
1140
1049
|
async goto(url, options = {}) {
|
1141
|
-
return await __classPrivateFieldGet(this,
|
1050
|
+
return await __classPrivateFieldGet(this, _CDPPage_frameManager, "f").mainFrame().goto(url, options);
|
1142
1051
|
}
|
1143
1052
|
/**
|
1144
1053
|
* @param options - Navigation parameters which might have the following
|
@@ -1169,7 +1078,7 @@ export class Page extends EventEmitter {
|
|
1169
1078
|
async reload(options) {
|
1170
1079
|
const result = await Promise.all([
|
1171
1080
|
this.waitForNavigation(options),
|
1172
|
-
__classPrivateFieldGet(this,
|
1081
|
+
__classPrivateFieldGet(this, _CDPPage_client, "f").send('Page.reload'),
|
1173
1082
|
]);
|
1174
1083
|
return result[0];
|
1175
1084
|
}
|
@@ -1201,7 +1110,7 @@ export class Page extends EventEmitter {
|
|
1201
1110
|
* API usage, the navigation will resolve with `null`.
|
1202
1111
|
*/
|
1203
1112
|
async waitForNavigation(options = {}) {
|
1204
|
-
return await __classPrivateFieldGet(this,
|
1113
|
+
return await __classPrivateFieldGet(this, _CDPPage_frameManager, "f").mainFrame().waitForNavigation(options);
|
1205
1114
|
}
|
1206
1115
|
/**
|
1207
1116
|
* @param urlOrPredicate - A URL or predicate to wait for
|
@@ -1231,16 +1140,16 @@ export class Page extends EventEmitter {
|
|
1231
1140
|
* {@link Page.setDefaultTimeout} method.
|
1232
1141
|
*/
|
1233
1142
|
async waitForRequest(urlOrPredicate, options = {}) {
|
1234
|
-
const { timeout = __classPrivateFieldGet(this,
|
1235
|
-
return waitForEvent(__classPrivateFieldGet(this,
|
1143
|
+
const { timeout = __classPrivateFieldGet(this, _CDPPage_timeoutSettings, "f").timeout() } = options;
|
1144
|
+
return waitForEvent(__classPrivateFieldGet(this, _CDPPage_frameManager, "f").networkManager, NetworkManagerEmittedEvents.Request, async (request) => {
|
1236
1145
|
if (isString(urlOrPredicate)) {
|
1237
1146
|
return urlOrPredicate === request.url();
|
1238
1147
|
}
|
1239
1148
|
if (typeof urlOrPredicate === 'function') {
|
1240
|
-
return !!urlOrPredicate(request);
|
1149
|
+
return !!(await urlOrPredicate(request));
|
1241
1150
|
}
|
1242
1151
|
return false;
|
1243
|
-
}, timeout, __classPrivateFieldGet(this,
|
1152
|
+
}, timeout, __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_sessionClosePromise).call(this));
|
1244
1153
|
}
|
1245
1154
|
/**
|
1246
1155
|
* @param urlOrPredicate - A URL or predicate to wait for.
|
@@ -1270,8 +1179,8 @@ export class Page extends EventEmitter {
|
|
1270
1179
|
* the {@link Page.setDefaultTimeout} method.
|
1271
1180
|
*/
|
1272
1181
|
async waitForResponse(urlOrPredicate, options = {}) {
|
1273
|
-
const { timeout = __classPrivateFieldGet(this,
|
1274
|
-
return waitForEvent(__classPrivateFieldGet(this,
|
1182
|
+
const { timeout = __classPrivateFieldGet(this, _CDPPage_timeoutSettings, "f").timeout() } = options;
|
1183
|
+
return waitForEvent(__classPrivateFieldGet(this, _CDPPage_frameManager, "f").networkManager, NetworkManagerEmittedEvents.Response, async (response) => {
|
1275
1184
|
if (isString(urlOrPredicate)) {
|
1276
1185
|
return urlOrPredicate === response.url();
|
1277
1186
|
}
|
@@ -1279,15 +1188,15 @@ export class Page extends EventEmitter {
|
|
1279
1188
|
return !!(await urlOrPredicate(response));
|
1280
1189
|
}
|
1281
1190
|
return false;
|
1282
|
-
}, timeout, __classPrivateFieldGet(this,
|
1191
|
+
}, timeout, __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_sessionClosePromise).call(this));
|
1283
1192
|
}
|
1284
1193
|
/**
|
1285
1194
|
* @param options - Optional waiting parameters
|
1286
1195
|
* @returns Promise which resolves when network is idle
|
1287
1196
|
*/
|
1288
1197
|
async waitForNetworkIdle(options = {}) {
|
1289
|
-
const { idleTime = 500, timeout = __classPrivateFieldGet(this,
|
1290
|
-
const networkManager = __classPrivateFieldGet(this,
|
1198
|
+
const { idleTime = 500, timeout = __classPrivateFieldGet(this, _CDPPage_timeoutSettings, "f").timeout() } = options;
|
1199
|
+
const networkManager = __classPrivateFieldGet(this, _CDPPage_frameManager, "f").networkManager;
|
1291
1200
|
let idleResolveCallback;
|
1292
1201
|
const idlePromise = new Promise(resolve => {
|
1293
1202
|
idleResolveCallback = resolve;
|
@@ -1325,7 +1234,7 @@ export class Page extends EventEmitter {
|
|
1325
1234
|
await Promise.race([
|
1326
1235
|
idlePromise,
|
1327
1236
|
...eventPromises,
|
1328
|
-
__classPrivateFieldGet(this,
|
1237
|
+
__classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_sessionClosePromise).call(this),
|
1329
1238
|
]).then(r => {
|
1330
1239
|
cleanup();
|
1331
1240
|
return r;
|
@@ -1354,7 +1263,7 @@ export class Page extends EventEmitter {
|
|
1354
1263
|
* the {@link Page.setDefaultTimeout} method.
|
1355
1264
|
*/
|
1356
1265
|
async waitForFrame(urlOrPredicate, options = {}) {
|
1357
|
-
const { timeout = __classPrivateFieldGet(this,
|
1266
|
+
const { timeout = __classPrivateFieldGet(this, _CDPPage_timeoutSettings, "f").timeout() } = options;
|
1358
1267
|
let predicate;
|
1359
1268
|
if (isString(urlOrPredicate)) {
|
1360
1269
|
predicate = (frame) => {
|
@@ -1371,8 +1280,8 @@ export class Page extends EventEmitter {
|
|
1371
1280
|
};
|
1372
1281
|
}
|
1373
1282
|
const eventRace = Promise.race([
|
1374
|
-
waitForEvent(__classPrivateFieldGet(this,
|
1375
|
-
waitForEvent(__classPrivateFieldGet(this,
|
1283
|
+
waitForEvent(__classPrivateFieldGet(this, _CDPPage_frameManager, "f"), FrameManagerEmittedEvents.FrameAttached, predicate, timeout, __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_sessionClosePromise).call(this)),
|
1284
|
+
waitForEvent(__classPrivateFieldGet(this, _CDPPage_frameManager, "f"), FrameManagerEmittedEvents.FrameNavigated, predicate, timeout, __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_sessionClosePromise).call(this)),
|
1376
1285
|
...this.frames().map(async (frame) => {
|
1377
1286
|
if (await predicate(frame)) {
|
1378
1287
|
return frame;
|
@@ -1409,7 +1318,7 @@ export class Page extends EventEmitter {
|
|
1409
1318
|
* more than 2 network connections for at least `500` ms.
|
1410
1319
|
*/
|
1411
1320
|
async goBack(options = {}) {
|
1412
|
-
return __classPrivateFieldGet(this,
|
1321
|
+
return __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_go).call(this, -1, options);
|
1413
1322
|
}
|
1414
1323
|
/**
|
1415
1324
|
* This method navigate to the next page in history.
|
@@ -1438,47 +1347,13 @@ export class Page extends EventEmitter {
|
|
1438
1347
|
* more than 2 network connections for at least `500` ms.
|
1439
1348
|
*/
|
1440
1349
|
async goForward(options = {}) {
|
1441
|
-
return __classPrivateFieldGet(this,
|
1350
|
+
return __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_go).call(this, +1, options);
|
1442
1351
|
}
|
1443
1352
|
/**
|
1444
1353
|
* Brings page to front (activates tab).
|
1445
1354
|
*/
|
1446
1355
|
async bringToFront() {
|
1447
|
-
await __classPrivateFieldGet(this,
|
1448
|
-
}
|
1449
|
-
/**
|
1450
|
-
* Emulates given device metrics and user agent.
|
1451
|
-
*
|
1452
|
-
* @remarks
|
1453
|
-
* This method is a shortcut for calling two methods:
|
1454
|
-
* {@link Page.setUserAgent} and {@link Page.setViewport} To aid emulation,
|
1455
|
-
* Puppeteer provides a list of device descriptors that can be obtained via
|
1456
|
-
* {@link devices}. `page.emulate` will resize the page. A lot of websites
|
1457
|
-
* don't expect phones to change size, so you should emulate before navigating
|
1458
|
-
* to the page.
|
1459
|
-
* @example
|
1460
|
-
*
|
1461
|
-
* ```ts
|
1462
|
-
* const puppeteer = require('puppeteer');
|
1463
|
-
* const iPhone = puppeteer.devices['iPhone 6'];
|
1464
|
-
* (async () => {
|
1465
|
-
* const browser = await puppeteer.launch();
|
1466
|
-
* const page = await browser.newPage();
|
1467
|
-
* await page.emulate(iPhone);
|
1468
|
-
* await page.goto('https://www.google.com');
|
1469
|
-
* // other actions...
|
1470
|
-
* await browser.close();
|
1471
|
-
* })();
|
1472
|
-
* ```
|
1473
|
-
*
|
1474
|
-
* @remarks List of all available devices is available in the source code:
|
1475
|
-
* {@link https://github.com/puppeteer/puppeteer/blob/main/src/common/DeviceDescriptors.ts | src/common/DeviceDescriptors.ts}.
|
1476
|
-
*/
|
1477
|
-
async emulate(options) {
|
1478
|
-
await Promise.all([
|
1479
|
-
this.setViewport(options.viewport),
|
1480
|
-
this.setUserAgent(options.userAgent),
|
1481
|
-
]);
|
1356
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Page.bringToFront');
|
1482
1357
|
}
|
1483
1358
|
/**
|
1484
1359
|
* @param enabled - Whether or not to enable JavaScript on the page.
|
@@ -1488,11 +1363,11 @@ export class Page extends EventEmitter {
|
|
1488
1363
|
* It will take full effect on the next navigation.
|
1489
1364
|
*/
|
1490
1365
|
async setJavaScriptEnabled(enabled) {
|
1491
|
-
if (__classPrivateFieldGet(this,
|
1366
|
+
if (__classPrivateFieldGet(this, _CDPPage_javascriptEnabled, "f") === enabled) {
|
1492
1367
|
return;
|
1493
1368
|
}
|
1494
|
-
__classPrivateFieldSet(this,
|
1495
|
-
await __classPrivateFieldGet(this,
|
1369
|
+
__classPrivateFieldSet(this, _CDPPage_javascriptEnabled, enabled, "f");
|
1370
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.setScriptExecutionDisabled', {
|
1496
1371
|
value: !enabled,
|
1497
1372
|
});
|
1498
1373
|
}
|
@@ -1505,7 +1380,7 @@ export class Page extends EventEmitter {
|
|
1505
1380
|
* before navigating to the domain.
|
1506
1381
|
*/
|
1507
1382
|
async setBypassCSP(enabled) {
|
1508
|
-
await __classPrivateFieldGet(this,
|
1383
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Page.setBypassCSP', { enabled });
|
1509
1384
|
}
|
1510
1385
|
/**
|
1511
1386
|
* @param type - Changes the CSS media type of the page. The only allowed
|
@@ -1536,7 +1411,7 @@ export class Page extends EventEmitter {
|
|
1536
1411
|
assert(type === 'screen' ||
|
1537
1412
|
type === 'print' ||
|
1538
1413
|
(type !== null && type !== void 0 ? type : undefined) === undefined, 'Unsupported media type: ' + type);
|
1539
|
-
await __classPrivateFieldGet(this,
|
1414
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.setEmulatedMedia', {
|
1540
1415
|
media: type || '',
|
1541
1416
|
});
|
1542
1417
|
}
|
@@ -1546,7 +1421,7 @@ export class Page extends EventEmitter {
|
|
1546
1421
|
*/
|
1547
1422
|
async emulateCPUThrottling(factor) {
|
1548
1423
|
assert(factor === null || factor >= 1, 'Throttling rate should be greater or equal to 1');
|
1549
|
-
await __classPrivateFieldGet(this,
|
1424
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.setCPUThrottlingRate', {
|
1550
1425
|
rate: factor !== null ? factor : 1,
|
1551
1426
|
});
|
1552
1427
|
}
|
@@ -1613,14 +1488,14 @@ export class Page extends EventEmitter {
|
|
1613
1488
|
*/
|
1614
1489
|
async emulateMediaFeatures(features) {
|
1615
1490
|
if (!features) {
|
1616
|
-
await __classPrivateFieldGet(this,
|
1491
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.setEmulatedMedia', {});
|
1617
1492
|
}
|
1618
1493
|
if (Array.isArray(features)) {
|
1619
1494
|
for (const mediaFeature of features) {
|
1620
1495
|
const name = mediaFeature.name;
|
1621
1496
|
assert(/^(?:prefers-(?:color-scheme|reduced-motion)|color-gamut)$/.test(name), 'Unsupported media feature: ' + name);
|
1622
1497
|
}
|
1623
|
-
await __classPrivateFieldGet(this,
|
1498
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.setEmulatedMedia', {
|
1624
1499
|
features: features,
|
1625
1500
|
});
|
1626
1501
|
}
|
@@ -1633,7 +1508,7 @@ export class Page extends EventEmitter {
|
|
1633
1508
|
*/
|
1634
1509
|
async emulateTimezone(timezoneId) {
|
1635
1510
|
try {
|
1636
|
-
await __classPrivateFieldGet(this,
|
1511
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.setTimezoneOverride', {
|
1637
1512
|
timezoneId: timezoneId || '',
|
1638
1513
|
});
|
1639
1514
|
}
|
@@ -1665,13 +1540,13 @@ export class Page extends EventEmitter {
|
|
1665
1540
|
*/
|
1666
1541
|
async emulateIdleState(overrides) {
|
1667
1542
|
if (overrides) {
|
1668
|
-
await __classPrivateFieldGet(this,
|
1543
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.setIdleOverride', {
|
1669
1544
|
isUserActive: overrides.isUserActive,
|
1670
1545
|
isScreenUnlocked: overrides.isScreenUnlocked,
|
1671
1546
|
});
|
1672
1547
|
}
|
1673
1548
|
else {
|
1674
|
-
await __classPrivateFieldGet(this,
|
1549
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.clearIdleOverride');
|
1675
1550
|
}
|
1676
1551
|
}
|
1677
1552
|
/**
|
@@ -1713,7 +1588,7 @@ export class Page extends EventEmitter {
|
|
1713
1588
|
]);
|
1714
1589
|
try {
|
1715
1590
|
assert(!type || visionDeficiencies.has(type), `Unsupported vision deficiency: ${type}`);
|
1716
|
-
await __classPrivateFieldGet(this,
|
1591
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.setEmulatedVisionDeficiency', {
|
1717
1592
|
type: type || 'none',
|
1718
1593
|
});
|
1719
1594
|
}
|
@@ -1762,8 +1637,8 @@ export class Page extends EventEmitter {
|
|
1762
1637
|
* set the isMobile or hasTouch properties.
|
1763
1638
|
*/
|
1764
1639
|
async setViewport(viewport) {
|
1765
|
-
const needsReload = await __classPrivateFieldGet(this,
|
1766
|
-
__classPrivateFieldSet(this,
|
1640
|
+
const needsReload = await __classPrivateFieldGet(this, _CDPPage_emulationManager, "f").emulateViewport(viewport);
|
1641
|
+
__classPrivateFieldSet(this, _CDPPage_viewport, viewport, "f");
|
1767
1642
|
if (needsReload) {
|
1768
1643
|
await this.reload();
|
1769
1644
|
}
|
@@ -1788,7 +1663,7 @@ export class Page extends EventEmitter {
|
|
1788
1663
|
* `false`.
|
1789
1664
|
*/
|
1790
1665
|
viewport() {
|
1791
|
-
return __classPrivateFieldGet(this,
|
1666
|
+
return __classPrivateFieldGet(this, _CDPPage_viewport, "f");
|
1792
1667
|
}
|
1793
1668
|
/**
|
1794
1669
|
* Evaluates a function in the page's context and returns the result.
|
@@ -1838,7 +1713,7 @@ export class Page extends EventEmitter {
|
|
1838
1713
|
* @returns the return value of `pageFunction`.
|
1839
1714
|
*/
|
1840
1715
|
async evaluate(pageFunction, ...args) {
|
1841
|
-
return __classPrivateFieldGet(this,
|
1716
|
+
return __classPrivateFieldGet(this, _CDPPage_frameManager, "f").mainFrame().evaluate(pageFunction, ...args);
|
1842
1717
|
}
|
1843
1718
|
/**
|
1844
1719
|
* Adds a function which would be invoked in one of the following scenarios:
|
@@ -1861,20 +1736,20 @@ export class Page extends EventEmitter {
|
|
1861
1736
|
*
|
1862
1737
|
* // overwrite the `languages` property to use a custom getter
|
1863
1738
|
* Object.defineProperty(navigator, 'languages', {
|
1864
|
-
*
|
1865
|
-
*
|
1866
|
-
*
|
1739
|
+
* get: function () {
|
1740
|
+
* return ['en-US', 'en', 'bn'];
|
1741
|
+
* },
|
1867
1742
|
* });
|
1868
1743
|
*
|
1869
1744
|
* // In your puppeteer script, assuming the preload.js file is
|
1870
|
-
* in same folder of our script
|
1745
|
+
* // in same folder of our script.
|
1871
1746
|
* const preloadFile = fs.readFileSync('./preload.js', 'utf8');
|
1872
1747
|
* await page.evaluateOnNewDocument(preloadFile);
|
1873
1748
|
* ```
|
1874
1749
|
*/
|
1875
1750
|
async evaluateOnNewDocument(pageFunction, ...args) {
|
1876
1751
|
const source = evaluationString(pageFunction, ...args);
|
1877
|
-
await __classPrivateFieldGet(this,
|
1752
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Page.addScriptToEvaluateOnNewDocument', {
|
1878
1753
|
source,
|
1879
1754
|
});
|
1880
1755
|
}
|
@@ -1884,7 +1759,7 @@ export class Page extends EventEmitter {
|
|
1884
1759
|
* @param enabled - sets the `enabled` state of cache
|
1885
1760
|
*/
|
1886
1761
|
async setCacheEnabled(enabled = true) {
|
1887
|
-
await __classPrivateFieldGet(this,
|
1762
|
+
await __classPrivateFieldGet(this, _CDPPage_frameManager, "f").networkManager.setCacheEnabled(enabled);
|
1888
1763
|
}
|
1889
1764
|
/**
|
1890
1765
|
* @remarks
|
@@ -1988,8 +1863,8 @@ export class Page extends EventEmitter {
|
|
1988
1863
|
assert(options.clip.width !== 0, 'Expected options.clip.width not to be 0.');
|
1989
1864
|
assert(options.clip.height !== 0, 'Expected options.clip.height not to be 0.');
|
1990
1865
|
}
|
1991
|
-
return __classPrivateFieldGet(this,
|
1992
|
-
return __classPrivateFieldGet(this,
|
1866
|
+
return __classPrivateFieldGet(this, _CDPPage_screenshotTaskQueue, "f").postTask(() => {
|
1867
|
+
return __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_screenshotTask).call(this, screenshotType, options);
|
1993
1868
|
});
|
1994
1869
|
}
|
1995
1870
|
/**
|
@@ -2029,9 +1904,9 @@ export class Page extends EventEmitter {
|
|
2029
1904
|
const marginBottom = convertPrintParameterToInches(margin.bottom) || 0;
|
2030
1905
|
const marginRight = convertPrintParameterToInches(margin.right) || 0;
|
2031
1906
|
if (omitBackground) {
|
2032
|
-
await __classPrivateFieldGet(this,
|
1907
|
+
await __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_setTransparentBackgroundColor).call(this);
|
2033
1908
|
}
|
2034
|
-
const printCommandPromise = __classPrivateFieldGet(this,
|
1909
|
+
const printCommandPromise = __classPrivateFieldGet(this, _CDPPage_client, "f").send('Page.printToPDF', {
|
2035
1910
|
transferMode: 'ReturnAsStream',
|
2036
1911
|
landscape,
|
2037
1912
|
displayHeaderFooter,
|
@@ -2050,10 +1925,10 @@ export class Page extends EventEmitter {
|
|
2050
1925
|
});
|
2051
1926
|
const result = await waitWithTimeout(printCommandPromise, 'Page.printToPDF', timeout);
|
2052
1927
|
if (omitBackground) {
|
2053
|
-
await __classPrivateFieldGet(this,
|
1928
|
+
await __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_resetDefaultBackgroundColor).call(this);
|
2054
1929
|
}
|
2055
1930
|
assert(result.stream, '`stream` is missing from `Page.printToPDF');
|
2056
|
-
return getReadableFromProtocolStream(__classPrivateFieldGet(this,
|
1931
|
+
return getReadableFromProtocolStream(__classPrivateFieldGet(this, _CDPPage_client, "f"), result.stream);
|
2057
1932
|
}
|
2058
1933
|
/**
|
2059
1934
|
* @param options -
|
@@ -2075,17 +1950,17 @@ export class Page extends EventEmitter {
|
|
2075
1950
|
return this.mainFrame().title();
|
2076
1951
|
}
|
2077
1952
|
async close(options = { runBeforeUnload: undefined }) {
|
2078
|
-
const connection = __classPrivateFieldGet(this,
|
1953
|
+
const connection = __classPrivateFieldGet(this, _CDPPage_client, "f").connection();
|
2079
1954
|
assert(connection, 'Protocol error: Connection closed. Most likely the page has been closed.');
|
2080
1955
|
const runBeforeUnload = !!options.runBeforeUnload;
|
2081
1956
|
if (runBeforeUnload) {
|
2082
|
-
await __classPrivateFieldGet(this,
|
1957
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Page.close');
|
2083
1958
|
}
|
2084
1959
|
else {
|
2085
1960
|
await connection.send('Target.closeTarget', {
|
2086
|
-
targetId: __classPrivateFieldGet(this,
|
1961
|
+
targetId: __classPrivateFieldGet(this, _CDPPage_target, "f")._targetId,
|
2087
1962
|
});
|
2088
|
-
await __classPrivateFieldGet(this,
|
1963
|
+
await __classPrivateFieldGet(this, _CDPPage_target, "f")._isClosedPromise;
|
2089
1964
|
}
|
2090
1965
|
}
|
2091
1966
|
/**
|
@@ -2093,10 +1968,10 @@ export class Page extends EventEmitter {
|
|
2093
1968
|
* @returns
|
2094
1969
|
*/
|
2095
1970
|
isClosed() {
|
2096
|
-
return __classPrivateFieldGet(this,
|
1971
|
+
return __classPrivateFieldGet(this, _CDPPage_closed, "f");
|
2097
1972
|
}
|
2098
1973
|
get mouse() {
|
2099
|
-
return __classPrivateFieldGet(this,
|
1974
|
+
return __classPrivateFieldGet(this, _CDPPage_mouse, "f");
|
2100
1975
|
}
|
2101
1976
|
/**
|
2102
1977
|
* This method fetches an element with `selector`, scrolls it into view if
|
@@ -2228,7 +2103,7 @@ export class Page extends EventEmitter {
|
|
2228
2103
|
return this.mainFrame().type(selector, text, options);
|
2229
2104
|
}
|
2230
2105
|
/**
|
2231
|
-
* @deprecated
|
2106
|
+
* @deprecated Replace with `new Promise(r => setTimeout(r, milliseconds));`.
|
2232
2107
|
*
|
2233
2108
|
* Causes your script to wait for the given number of milliseconds.
|
2234
2109
|
*
|
@@ -2411,64 +2286,59 @@ export class Page extends EventEmitter {
|
|
2411
2286
|
* ```
|
2412
2287
|
*
|
2413
2288
|
* @param pageFunction - Function to be evaluated in browser context
|
2414
|
-
* @param options -
|
2415
|
-
*
|
2416
|
-
* - `polling` - An interval at which the `pageFunction` is executed, defaults
|
2417
|
-
* to `raf`. If `polling` is a number, then it is treated as an interval in
|
2418
|
-
* milliseconds at which the function would be executed. If polling is a
|
2419
|
-
* string, then it can be one of the following values:
|
2420
|
-
* - `raf` - to constantly execute `pageFunction` in
|
2421
|
-
* `requestAnimationFrame` callback. This is the tightest polling mode
|
2422
|
-
* which is suitable to observe styling changes.
|
2423
|
-
* - `mutation`- to execute pageFunction on every DOM mutation.
|
2424
|
-
* - `timeout` - maximum time to wait for in milliseconds. Defaults to `30000`
|
2425
|
-
* (30 seconds). Pass `0` to disable timeout. The default value can be
|
2426
|
-
* changed by using the {@link Page.setDefaultTimeout} method.
|
2427
|
-
* @param args - Arguments to pass to `pageFunction`
|
2428
|
-
* @returns A `Promise` which resolves to a JSHandle/ElementHandle of the the
|
2429
|
-
* `pageFunction`'s return value.
|
2289
|
+
* @param options - Options for configuring waiting behavior.
|
2430
2290
|
*/
|
2431
2291
|
waitForFunction(pageFunction, options = {}, ...args) {
|
2432
2292
|
return this.mainFrame().waitForFunction(pageFunction, options, ...args);
|
2433
2293
|
}
|
2434
2294
|
}
|
2435
|
-
|
2436
|
-
|
2437
|
-
|
2438
|
-
|
2439
|
-
|
2440
|
-
|
2441
|
-
|
2442
|
-
|
2295
|
+
_CDPPage_closed = new WeakMap(), _CDPPage_client = new WeakMap(), _CDPPage_target = new WeakMap(), _CDPPage_keyboard = new WeakMap(), _CDPPage_mouse = new WeakMap(), _CDPPage_timeoutSettings = new WeakMap(), _CDPPage_touchscreen = new WeakMap(), _CDPPage_accessibility = new WeakMap(), _CDPPage_frameManager = new WeakMap(), _CDPPage_emulationManager = new WeakMap(), _CDPPage_tracing = new WeakMap(), _CDPPage_pageBindings = new WeakMap(), _CDPPage_coverage = new WeakMap(), _CDPPage_javascriptEnabled = new WeakMap(), _CDPPage_viewport = new WeakMap(), _CDPPage_screenshotTaskQueue = new WeakMap(), _CDPPage_workers = new WeakMap(), _CDPPage_fileChooserPromises = new WeakMap(), _CDPPage_disconnectPromise = new WeakMap(), _CDPPage_userDragInterceptionEnabled = new WeakMap(), _CDPPage_onDetachedFromTarget = new WeakMap(), _CDPPage_onAttachedToTarget = new WeakMap(), _CDPPage_instances = new WeakSet(), _CDPPage_initialize = async function _CDPPage_initialize() {
|
2296
|
+
try {
|
2297
|
+
await Promise.all([
|
2298
|
+
__classPrivateFieldGet(this, _CDPPage_frameManager, "f").initialize(),
|
2299
|
+
__classPrivateFieldGet(this, _CDPPage_client, "f").send('Performance.enable'),
|
2300
|
+
__classPrivateFieldGet(this, _CDPPage_client, "f").send('Log.enable'),
|
2301
|
+
]);
|
2302
|
+
}
|
2303
|
+
catch (err) {
|
2304
|
+
if (isErrorLike(err) && isTargetClosedError(err)) {
|
2305
|
+
debugError(err);
|
2306
|
+
}
|
2307
|
+
else {
|
2308
|
+
throw err;
|
2309
|
+
}
|
2310
|
+
}
|
2311
|
+
}, _CDPPage_onFileChooser = async function _CDPPage_onFileChooser(event) {
|
2312
|
+
if (!__classPrivateFieldGet(this, _CDPPage_fileChooserPromises, "f").size) {
|
2443
2313
|
return;
|
2444
2314
|
}
|
2445
|
-
const frame = __classPrivateFieldGet(this,
|
2315
|
+
const frame = __classPrivateFieldGet(this, _CDPPage_frameManager, "f").frame(event.frameId);
|
2446
2316
|
assert(frame, 'This should never happen.');
|
2447
2317
|
// This is guaranteed to be an HTMLInputElement handle by the event.
|
2448
2318
|
const handle = (await frame.worlds[MAIN_WORLD].adoptBackendNode(event.backendNodeId));
|
2449
2319
|
const fileChooser = new FileChooser(handle, event);
|
2450
|
-
for (const promise of __classPrivateFieldGet(this,
|
2320
|
+
for (const promise of __classPrivateFieldGet(this, _CDPPage_fileChooserPromises, "f")) {
|
2451
2321
|
promise.resolve(fileChooser);
|
2452
2322
|
}
|
2453
|
-
__classPrivateFieldGet(this,
|
2454
|
-
},
|
2323
|
+
__classPrivateFieldGet(this, _CDPPage_fileChooserPromises, "f").clear();
|
2324
|
+
}, _CDPPage_onTargetCrashed = function _CDPPage_onTargetCrashed() {
|
2455
2325
|
this.emit('error', new Error('Page crashed!'));
|
2456
|
-
},
|
2326
|
+
}, _CDPPage_onLogEntryAdded = function _CDPPage_onLogEntryAdded(event) {
|
2457
2327
|
const { level, text, args, source, url, lineNumber } = event.entry;
|
2458
2328
|
if (args) {
|
2459
2329
|
args.map(arg => {
|
2460
|
-
return releaseObject(__classPrivateFieldGet(this,
|
2330
|
+
return releaseObject(__classPrivateFieldGet(this, _CDPPage_client, "f"), arg);
|
2461
2331
|
});
|
2462
2332
|
}
|
2463
2333
|
if (source !== 'worker') {
|
2464
2334
|
this.emit("console" /* PageEmittedEvents.Console */, new ConsoleMessage(level, text, [], [{ url, lineNumber }]));
|
2465
2335
|
}
|
2466
|
-
},
|
2336
|
+
}, _CDPPage_emitMetrics = function _CDPPage_emitMetrics(event) {
|
2467
2337
|
this.emit("metrics" /* PageEmittedEvents.Metrics */, {
|
2468
2338
|
title: event.title,
|
2469
|
-
metrics: __classPrivateFieldGet(this,
|
2339
|
+
metrics: __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_buildMetricsObject).call(this, event.metrics),
|
2470
2340
|
});
|
2471
|
-
},
|
2341
|
+
}, _CDPPage_buildMetricsObject = function _CDPPage_buildMetricsObject(metrics) {
|
2472
2342
|
const result = {};
|
2473
2343
|
for (const metric of metrics || []) {
|
2474
2344
|
if (supportedMetrics.has(metric.name)) {
|
@@ -2476,12 +2346,12 @@ _Page_closed = new WeakMap(), _Page_client = new WeakMap(), _Page_target = new W
|
|
2476
2346
|
}
|
2477
2347
|
}
|
2478
2348
|
return result;
|
2479
|
-
},
|
2349
|
+
}, _CDPPage_handleException = function _CDPPage_handleException(exceptionDetails) {
|
2480
2350
|
const message = getExceptionMessage(exceptionDetails);
|
2481
2351
|
const err = new Error(message);
|
2482
2352
|
err.stack = ''; // Don't report clientside error with a node stack attached
|
2483
2353
|
this.emit("pageerror" /* PageEmittedEvents.PageError */, err);
|
2484
|
-
},
|
2354
|
+
}, _CDPPage_onConsoleAPI = async function _CDPPage_onConsoleAPI(event) {
|
2485
2355
|
if (event.executionContextId === 0) {
|
2486
2356
|
// DevTools protocol stores the last 1000 console messages. These
|
2487
2357
|
// messages are always reported even for removed execution contexts. In
|
@@ -2498,12 +2368,12 @@ _Page_closed = new WeakMap(), _Page_client = new WeakMap(), _Page_target = new W
|
|
2498
2368
|
// @see https://github.com/puppeteer/puppeteer/issues/3865
|
2499
2369
|
return;
|
2500
2370
|
}
|
2501
|
-
const context = __classPrivateFieldGet(this,
|
2371
|
+
const context = __classPrivateFieldGet(this, _CDPPage_frameManager, "f").executionContextById(event.executionContextId, __classPrivateFieldGet(this, _CDPPage_client, "f"));
|
2502
2372
|
const values = event.args.map(arg => {
|
2503
2373
|
return createJSHandle(context, arg);
|
2504
2374
|
});
|
2505
|
-
__classPrivateFieldGet(this,
|
2506
|
-
},
|
2375
|
+
__classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_addConsoleMessage).call(this, event.type, values, event.stackTrace);
|
2376
|
+
}, _CDPPage_onBindingCalled = async function _CDPPage_onBindingCalled(event) {
|
2507
2377
|
let payload;
|
2508
2378
|
try {
|
2509
2379
|
payload = JSON.parse(event.payload);
|
@@ -2514,12 +2384,12 @@ _Page_closed = new WeakMap(), _Page_client = new WeakMap(), _Page_target = new W
|
|
2514
2384
|
return;
|
2515
2385
|
}
|
2516
2386
|
const { type, name, seq, args } = payload;
|
2517
|
-
if (type !== 'exposedFun' || !__classPrivateFieldGet(this,
|
2387
|
+
if (type !== 'exposedFun' || !__classPrivateFieldGet(this, _CDPPage_pageBindings, "f").has(name)) {
|
2518
2388
|
return;
|
2519
2389
|
}
|
2520
2390
|
let expression = null;
|
2521
2391
|
try {
|
2522
|
-
const pageBinding = __classPrivateFieldGet(this,
|
2392
|
+
const pageBinding = __classPrivateFieldGet(this, _CDPPage_pageBindings, "f").get(name);
|
2523
2393
|
assert(pageBinding);
|
2524
2394
|
const result = await pageBinding(...args);
|
2525
2395
|
expression = pageBindingDeliverResultString(name, seq, result);
|
@@ -2532,13 +2402,13 @@ _Page_closed = new WeakMap(), _Page_client = new WeakMap(), _Page_target = new W
|
|
2532
2402
|
expression = pageBindingDeliverErrorValueString(name, seq, error);
|
2533
2403
|
}
|
2534
2404
|
}
|
2535
|
-
__classPrivateFieldGet(this,
|
2405
|
+
__classPrivateFieldGet(this, _CDPPage_client, "f")
|
2536
2406
|
.send('Runtime.evaluate', {
|
2537
2407
|
expression,
|
2538
2408
|
contextId: event.executionContextId,
|
2539
2409
|
})
|
2540
2410
|
.catch(debugError);
|
2541
|
-
},
|
2411
|
+
}, _CDPPage_addConsoleMessage = function _CDPPage_addConsoleMessage(eventType, args, stackTrace) {
|
2542
2412
|
if (!this.listenerCount("console" /* PageEmittedEvents.Console */)) {
|
2543
2413
|
args.forEach(arg => {
|
2544
2414
|
return arg.dispose();
|
@@ -2567,7 +2437,7 @@ _Page_closed = new WeakMap(), _Page_client = new WeakMap(), _Page_target = new W
|
|
2567
2437
|
}
|
2568
2438
|
const message = new ConsoleMessage(eventType, textTokens.join(' '), args, stackTraceLocations);
|
2569
2439
|
this.emit("console" /* PageEmittedEvents.Console */, message);
|
2570
|
-
},
|
2440
|
+
}, _CDPPage_onDialog = function _CDPPage_onDialog(event) {
|
2571
2441
|
let dialogType = null;
|
2572
2442
|
const validDialogTypes = new Set([
|
2573
2443
|
'alert',
|
@@ -2579,65 +2449,62 @@ _Page_closed = new WeakMap(), _Page_client = new WeakMap(), _Page_target = new W
|
|
2579
2449
|
dialogType = event.type;
|
2580
2450
|
}
|
2581
2451
|
assert(dialogType, 'Unknown javascript dialog type: ' + event.type);
|
2582
|
-
const dialog = new Dialog(__classPrivateFieldGet(this,
|
2452
|
+
const dialog = new Dialog(__classPrivateFieldGet(this, _CDPPage_client, "f"), dialogType, event.message, event.defaultPrompt);
|
2583
2453
|
this.emit("dialog" /* PageEmittedEvents.Dialog */, dialog);
|
2584
|
-
},
|
2454
|
+
}, _CDPPage_resetDefaultBackgroundColor =
|
2585
2455
|
/**
|
2586
2456
|
* Resets default white background
|
2587
2457
|
*/
|
2588
|
-
async function
|
2589
|
-
await __classPrivateFieldGet(this,
|
2590
|
-
},
|
2458
|
+
async function _CDPPage_resetDefaultBackgroundColor() {
|
2459
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.setDefaultBackgroundColorOverride');
|
2460
|
+
}, _CDPPage_setTransparentBackgroundColor =
|
2591
2461
|
/**
|
2592
2462
|
* Hides default white background
|
2593
2463
|
*/
|
2594
|
-
async function
|
2595
|
-
await __classPrivateFieldGet(this,
|
2464
|
+
async function _CDPPage_setTransparentBackgroundColor() {
|
2465
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.setDefaultBackgroundColorOverride', {
|
2596
2466
|
color: { r: 0, g: 0, b: 0, a: 0 },
|
2597
2467
|
});
|
2598
|
-
},
|
2599
|
-
if (!__classPrivateFieldGet(this,
|
2600
|
-
__classPrivateFieldSet(this,
|
2601
|
-
return __classPrivateFieldGet(this,
|
2468
|
+
}, _CDPPage_sessionClosePromise = function _CDPPage_sessionClosePromise() {
|
2469
|
+
if (!__classPrivateFieldGet(this, _CDPPage_disconnectPromise, "f")) {
|
2470
|
+
__classPrivateFieldSet(this, _CDPPage_disconnectPromise, new Promise(fulfill => {
|
2471
|
+
return __classPrivateFieldGet(this, _CDPPage_client, "f").once(CDPSessionEmittedEvents.Disconnected, () => {
|
2602
2472
|
return fulfill(new Error('Target closed'));
|
2603
2473
|
});
|
2604
2474
|
}), "f");
|
2605
2475
|
}
|
2606
|
-
return __classPrivateFieldGet(this,
|
2607
|
-
},
|
2608
|
-
const history = await __classPrivateFieldGet(this,
|
2476
|
+
return __classPrivateFieldGet(this, _CDPPage_disconnectPromise, "f");
|
2477
|
+
}, _CDPPage_go = async function _CDPPage_go(delta, options) {
|
2478
|
+
const history = await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Page.getNavigationHistory');
|
2609
2479
|
const entry = history.entries[history.currentIndex + delta];
|
2610
2480
|
if (!entry) {
|
2611
2481
|
return null;
|
2612
2482
|
}
|
2613
2483
|
const result = await Promise.all([
|
2614
2484
|
this.waitForNavigation(options),
|
2615
|
-
__classPrivateFieldGet(this,
|
2485
|
+
__classPrivateFieldGet(this, _CDPPage_client, "f").send('Page.navigateToHistoryEntry', { entryId: entry.id }),
|
2616
2486
|
]);
|
2617
2487
|
return result[0];
|
2618
|
-
},
|
2619
|
-
|
2620
|
-
|
2488
|
+
}, _CDPPage_screenshotTask = async function _CDPPage_screenshotTask(format, options = {}) {
|
2489
|
+
var _a, _b;
|
2490
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Target.activateTarget', {
|
2491
|
+
targetId: __classPrivateFieldGet(this, _CDPPage_target, "f")._targetId,
|
2621
2492
|
});
|
2622
2493
|
let clip = options.clip ? processClip(options.clip) : undefined;
|
2623
|
-
|
2624
|
-
|
2625
|
-
: true;
|
2626
|
-
const fromSurface = typeof options.fromSurface === 'boolean'
|
2627
|
-
? options.fromSurface
|
2628
|
-
: undefined;
|
2494
|
+
let captureBeyondViewport = (_a = options.captureBeyondViewport) !== null && _a !== void 0 ? _a : true;
|
2495
|
+
const fromSurface = options.fromSurface;
|
2629
2496
|
if (options.fullPage) {
|
2630
|
-
const metrics = await __classPrivateFieldGet(this,
|
2497
|
+
const metrics = await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Page.getLayoutMetrics');
|
2631
2498
|
// Fallback to `contentSize` in case of using Firefox.
|
2632
2499
|
const { width, height } = metrics.cssContentSize || metrics.contentSize;
|
2633
2500
|
// Overwrite clip for full page.
|
2634
|
-
clip =
|
2501
|
+
clip = undefined;
|
2635
2502
|
if (!captureBeyondViewport) {
|
2636
|
-
const { isMobile = false, deviceScaleFactor = 1, isLandscape = false, } = __classPrivateFieldGet(this,
|
2503
|
+
const { isMobile = false, deviceScaleFactor = 1, isLandscape = false, } = __classPrivateFieldGet(this, _CDPPage_viewport, "f") || {};
|
2637
2504
|
const screenOrientation = isLandscape
|
2638
2505
|
? { angle: 90, type: 'landscapePrimary' }
|
2639
2506
|
: { angle: 0, type: 'portraitPrimary' };
|
2640
|
-
await __classPrivateFieldGet(this,
|
2507
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.setDeviceMetricsOverride', {
|
2641
2508
|
mobile: isMobile,
|
2642
2509
|
width,
|
2643
2510
|
height,
|
@@ -2646,22 +2513,28 @@ async function _Page_setTransparentBackgroundColor() {
|
|
2646
2513
|
});
|
2647
2514
|
}
|
2648
2515
|
}
|
2516
|
+
else if (!clip) {
|
2517
|
+
captureBeyondViewport = false;
|
2518
|
+
}
|
2649
2519
|
const shouldSetDefaultBackground = options.omitBackground && (format === 'png' || format === 'webp');
|
2650
2520
|
if (shouldSetDefaultBackground) {
|
2651
|
-
await __classPrivateFieldGet(this,
|
2521
|
+
await __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_setTransparentBackgroundColor).call(this);
|
2652
2522
|
}
|
2653
|
-
const result = await __classPrivateFieldGet(this,
|
2523
|
+
const result = await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Page.captureScreenshot', {
|
2654
2524
|
format,
|
2655
2525
|
quality: options.quality,
|
2656
|
-
clip
|
2526
|
+
clip: clip && {
|
2527
|
+
...clip,
|
2528
|
+
scale: (_b = clip.scale) !== null && _b !== void 0 ? _b : 1,
|
2529
|
+
},
|
2657
2530
|
captureBeyondViewport,
|
2658
2531
|
fromSurface,
|
2659
2532
|
});
|
2660
2533
|
if (shouldSetDefaultBackground) {
|
2661
|
-
await __classPrivateFieldGet(this,
|
2534
|
+
await __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_resetDefaultBackgroundColor).call(this);
|
2662
2535
|
}
|
2663
|
-
if (options.fullPage && __classPrivateFieldGet(this,
|
2664
|
-
await this.setViewport(__classPrivateFieldGet(this,
|
2536
|
+
if (options.fullPage && __classPrivateFieldGet(this, _CDPPage_viewport, "f")) {
|
2537
|
+
await this.setViewport(__classPrivateFieldGet(this, _CDPPage_viewport, "f"));
|
2665
2538
|
}
|
2666
2539
|
const buffer = options.encoding === 'base64'
|
2667
2540
|
? result.data
|
@@ -2684,7 +2557,7 @@ async function _Page_setTransparentBackgroundColor() {
|
|
2684
2557
|
const y = Math.round(clip.y);
|
2685
2558
|
const width = Math.round(clip.width + clip.x - x);
|
2686
2559
|
const height = Math.round(clip.height + clip.y - y);
|
2687
|
-
return { x, y, width, height, scale:
|
2560
|
+
return { x, y, width, height, scale: clip.scale };
|
2688
2561
|
}
|
2689
2562
|
};
|
2690
2563
|
const supportedMetrics = new Set([
|