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
@@ -25,160 +25,113 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
25
25
|
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");
|
26
26
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
27
27
|
};
|
28
|
-
var
|
28
|
+
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;
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
30
|
-
exports.
|
31
|
-
const
|
30
|
+
exports.CDPPage = void 0;
|
31
|
+
const Page_js_1 = require("../api/Page.js");
|
32
32
|
const assert_js_1 = require("../util/assert.js");
|
33
|
+
const DeferredPromise_js_1 = require("../util/DeferredPromise.js");
|
34
|
+
const ErrorLike_js_1 = require("../util/ErrorLike.js");
|
35
|
+
const Accessibility_js_1 = require("./Accessibility.js");
|
33
36
|
const Connection_js_1 = require("./Connection.js");
|
34
37
|
const ConsoleMessage_js_1 = require("./ConsoleMessage.js");
|
35
38
|
const Coverage_js_1 = require("./Coverage.js");
|
36
39
|
const Dialog_js_1 = require("./Dialog.js");
|
37
|
-
const IsolatedWorld_js_1 = require("./IsolatedWorld.js");
|
38
40
|
const EmulationManager_js_1 = require("./EmulationManager.js");
|
39
|
-
const EventEmitter_js_1 = require("./EventEmitter.js");
|
40
41
|
const FileChooser_js_1 = require("./FileChooser.js");
|
41
42
|
const FrameManager_js_1 = require("./FrameManager.js");
|
42
43
|
const Input_js_1 = require("./Input.js");
|
44
|
+
const IsolatedWorld_js_1 = require("./IsolatedWorld.js");
|
43
45
|
const NetworkManager_js_1 = require("./NetworkManager.js");
|
44
46
|
const PDFOptions_js_1 = require("./PDFOptions.js");
|
45
47
|
const TimeoutSettings_js_1 = require("./TimeoutSettings.js");
|
46
48
|
const Tracing_js_1 = require("./Tracing.js");
|
47
49
|
const util_js_1 = require("./util.js");
|
48
|
-
const ErrorLike_js_1 = require("../util/ErrorLike.js");
|
49
|
-
const DeferredPromise_js_1 = require("../util/DeferredPromise.js");
|
50
50
|
const WebWorker_js_1 = require("./WebWorker.js");
|
51
51
|
/**
|
52
|
-
*
|
53
|
-
* {@link https://developer.chrome.com/extensions/background_pages | extension background page}
|
54
|
-
* in Chromium.
|
55
|
-
*
|
56
|
-
* :::note
|
57
|
-
*
|
58
|
-
* One Browser instance might have multiple Page instances.
|
59
|
-
*
|
60
|
-
* :::
|
61
|
-
*
|
62
|
-
* @example
|
63
|
-
* This example creates a page, navigates it to a URL, and then saves a screenshot:
|
64
|
-
*
|
65
|
-
* ```ts
|
66
|
-
* const puppeteer = require('puppeteer');
|
67
|
-
*
|
68
|
-
* (async () => {
|
69
|
-
* const browser = await puppeteer.launch();
|
70
|
-
* const page = await browser.newPage();
|
71
|
-
* await page.goto('https://example.com');
|
72
|
-
* await page.screenshot({path: 'screenshot.png'});
|
73
|
-
* await browser.close();
|
74
|
-
* })();
|
75
|
-
* ```
|
76
|
-
*
|
77
|
-
* The Page class extends from Puppeteer's {@link EventEmitter} class and will
|
78
|
-
* emit various events which are documented in the {@link PageEmittedEvents} enum.
|
79
|
-
*
|
80
|
-
* @example
|
81
|
-
* This example logs a message for a single page `load` event:
|
82
|
-
*
|
83
|
-
* ```ts
|
84
|
-
* page.once('load', () => console.log('Page loaded!'));
|
85
|
-
* ```
|
86
|
-
*
|
87
|
-
* To unsubscribe from events use the {@link Page.off} method:
|
88
|
-
*
|
89
|
-
* ```ts
|
90
|
-
* function logRequest(interceptedRequest) {
|
91
|
-
* console.log('A request was made:', interceptedRequest.url());
|
92
|
-
* }
|
93
|
-
* page.on('request', logRequest);
|
94
|
-
* // Sometime later...
|
95
|
-
* page.off('request', logRequest);
|
96
|
-
* ```
|
97
|
-
*
|
98
|
-
* @public
|
52
|
+
* @internal
|
99
53
|
*/
|
100
|
-
class
|
54
|
+
class CDPPage extends Page_js_1.Page {
|
101
55
|
/**
|
102
56
|
* @internal
|
103
57
|
*/
|
104
58
|
constructor(client, target, ignoreHTTPSErrors, screenshotTaskQueue) {
|
105
59
|
super();
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
_Page_onDetachedFromTarget.set(this, (target) => {
|
60
|
+
_CDPPage_instances.add(this);
|
61
|
+
_CDPPage_closed.set(this, false);
|
62
|
+
_CDPPage_client.set(this, void 0);
|
63
|
+
_CDPPage_target.set(this, void 0);
|
64
|
+
_CDPPage_keyboard.set(this, void 0);
|
65
|
+
_CDPPage_mouse.set(this, void 0);
|
66
|
+
_CDPPage_timeoutSettings.set(this, new TimeoutSettings_js_1.TimeoutSettings());
|
67
|
+
_CDPPage_touchscreen.set(this, void 0);
|
68
|
+
_CDPPage_accessibility.set(this, void 0);
|
69
|
+
_CDPPage_frameManager.set(this, void 0);
|
70
|
+
_CDPPage_emulationManager.set(this, void 0);
|
71
|
+
_CDPPage_tracing.set(this, void 0);
|
72
|
+
_CDPPage_pageBindings.set(this, new Map());
|
73
|
+
_CDPPage_coverage.set(this, void 0);
|
74
|
+
_CDPPage_javascriptEnabled.set(this, true);
|
75
|
+
_CDPPage_viewport.set(this, void 0);
|
76
|
+
_CDPPage_screenshotTaskQueue.set(this, void 0);
|
77
|
+
_CDPPage_workers.set(this, new Map());
|
78
|
+
_CDPPage_fileChooserPromises.set(this, new Set());
|
79
|
+
_CDPPage_disconnectPromise.set(this, void 0);
|
80
|
+
_CDPPage_userDragInterceptionEnabled.set(this, false);
|
81
|
+
_CDPPage_onDetachedFromTarget.set(this, (target) => {
|
129
82
|
var _a;
|
130
83
|
const sessionId = (_a = target._session()) === null || _a === void 0 ? void 0 : _a.id();
|
131
|
-
__classPrivateFieldGet(this,
|
132
|
-
const worker = __classPrivateFieldGet(this,
|
84
|
+
__classPrivateFieldGet(this, _CDPPage_frameManager, "f").onDetachedFromTarget(target);
|
85
|
+
const worker = __classPrivateFieldGet(this, _CDPPage_workers, "f").get(sessionId);
|
133
86
|
if (!worker) {
|
134
87
|
return;
|
135
88
|
}
|
136
|
-
__classPrivateFieldGet(this,
|
89
|
+
__classPrivateFieldGet(this, _CDPPage_workers, "f").delete(sessionId);
|
137
90
|
this.emit("workerdestroyed" /* PageEmittedEvents.WorkerDestroyed */, worker);
|
138
91
|
});
|
139
|
-
|
140
|
-
__classPrivateFieldGet(this,
|
92
|
+
_CDPPage_onAttachedToTarget.set(this, async (createdTarget) => {
|
93
|
+
__classPrivateFieldGet(this, _CDPPage_frameManager, "f").onAttachedToTarget(createdTarget);
|
141
94
|
if (createdTarget._getTargetInfo().type === 'worker') {
|
142
95
|
const session = createdTarget._session();
|
143
96
|
(0, assert_js_1.assert)(session);
|
144
|
-
const worker = new WebWorker_js_1.WebWorker(session, createdTarget.url(), __classPrivateFieldGet(this,
|
145
|
-
__classPrivateFieldGet(this,
|
97
|
+
const worker = new WebWorker_js_1.WebWorker(session, createdTarget.url(), __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_addConsoleMessage).bind(this), __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_handleException).bind(this));
|
98
|
+
__classPrivateFieldGet(this, _CDPPage_workers, "f").set(session.id(), worker);
|
146
99
|
this.emit("workercreated" /* PageEmittedEvents.WorkerCreated */, worker);
|
147
100
|
}
|
148
101
|
if (createdTarget._session()) {
|
149
|
-
__classPrivateFieldGet(this,
|
102
|
+
__classPrivateFieldGet(this, _CDPPage_target, "f")
|
150
103
|
._targetManager()
|
151
|
-
.addTargetInterceptor(createdTarget._session(), __classPrivateFieldGet(this,
|
104
|
+
.addTargetInterceptor(createdTarget._session(), __classPrivateFieldGet(this, _CDPPage_onAttachedToTarget, "f"));
|
152
105
|
}
|
153
106
|
});
|
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
|
-
__classPrivateFieldSet(this,
|
164
|
-
__classPrivateFieldSet(this,
|
165
|
-
__classPrivateFieldSet(this,
|
166
|
-
__classPrivateFieldGet(this,
|
107
|
+
__classPrivateFieldSet(this, _CDPPage_client, client, "f");
|
108
|
+
__classPrivateFieldSet(this, _CDPPage_target, target, "f");
|
109
|
+
__classPrivateFieldSet(this, _CDPPage_keyboard, new Input_js_1.Keyboard(client), "f");
|
110
|
+
__classPrivateFieldSet(this, _CDPPage_mouse, new Input_js_1.Mouse(client, __classPrivateFieldGet(this, _CDPPage_keyboard, "f")), "f");
|
111
|
+
__classPrivateFieldSet(this, _CDPPage_touchscreen, new Input_js_1.Touchscreen(client, __classPrivateFieldGet(this, _CDPPage_keyboard, "f")), "f");
|
112
|
+
__classPrivateFieldSet(this, _CDPPage_accessibility, new Accessibility_js_1.Accessibility(client), "f");
|
113
|
+
__classPrivateFieldSet(this, _CDPPage_frameManager, new FrameManager_js_1.FrameManager(client, this, ignoreHTTPSErrors, __classPrivateFieldGet(this, _CDPPage_timeoutSettings, "f")), "f");
|
114
|
+
__classPrivateFieldSet(this, _CDPPage_emulationManager, new EmulationManager_js_1.EmulationManager(client), "f");
|
115
|
+
__classPrivateFieldSet(this, _CDPPage_tracing, new Tracing_js_1.Tracing(client), "f");
|
116
|
+
__classPrivateFieldSet(this, _CDPPage_coverage, new Coverage_js_1.Coverage(client), "f");
|
117
|
+
__classPrivateFieldSet(this, _CDPPage_screenshotTaskQueue, screenshotTaskQueue, "f");
|
118
|
+
__classPrivateFieldSet(this, _CDPPage_viewport, null, "f");
|
119
|
+
__classPrivateFieldGet(this, _CDPPage_target, "f")
|
167
120
|
._targetManager()
|
168
|
-
.addTargetInterceptor(__classPrivateFieldGet(this,
|
169
|
-
__classPrivateFieldGet(this,
|
121
|
+
.addTargetInterceptor(__classPrivateFieldGet(this, _CDPPage_client, "f"), __classPrivateFieldGet(this, _CDPPage_onAttachedToTarget, "f"));
|
122
|
+
__classPrivateFieldGet(this, _CDPPage_target, "f")
|
170
123
|
._targetManager()
|
171
|
-
.on("targetGone" /* TargetManagerEmittedEvents.TargetGone */, __classPrivateFieldGet(this,
|
172
|
-
__classPrivateFieldGet(this,
|
124
|
+
.on("targetGone" /* TargetManagerEmittedEvents.TargetGone */, __classPrivateFieldGet(this, _CDPPage_onDetachedFromTarget, "f"));
|
125
|
+
__classPrivateFieldGet(this, _CDPPage_frameManager, "f").on(FrameManager_js_1.FrameManagerEmittedEvents.FrameAttached, event => {
|
173
126
|
return this.emit("frameattached" /* PageEmittedEvents.FrameAttached */, event);
|
174
127
|
});
|
175
|
-
__classPrivateFieldGet(this,
|
128
|
+
__classPrivateFieldGet(this, _CDPPage_frameManager, "f").on(FrameManager_js_1.FrameManagerEmittedEvents.FrameDetached, event => {
|
176
129
|
return this.emit("framedetached" /* PageEmittedEvents.FrameDetached */, event);
|
177
130
|
});
|
178
|
-
__classPrivateFieldGet(this,
|
131
|
+
__classPrivateFieldGet(this, _CDPPage_frameManager, "f").on(FrameManager_js_1.FrameManagerEmittedEvents.FrameNavigated, event => {
|
179
132
|
return this.emit("framenavigated" /* PageEmittedEvents.FrameNavigated */, event);
|
180
133
|
});
|
181
|
-
const networkManager = __classPrivateFieldGet(this,
|
134
|
+
const networkManager = __classPrivateFieldGet(this, _CDPPage_frameManager, "f").networkManager;
|
182
135
|
networkManager.on(NetworkManager_js_1.NetworkManagerEmittedEvents.Request, event => {
|
183
136
|
return this.emit("request" /* PageEmittedEvents.Request */, event);
|
184
137
|
});
|
@@ -201,48 +154,58 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
201
154
|
return this.emit("load" /* PageEmittedEvents.Load */);
|
202
155
|
});
|
203
156
|
client.on('Runtime.consoleAPICalled', event => {
|
204
|
-
return __classPrivateFieldGet(this,
|
157
|
+
return __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_onConsoleAPI).call(this, event);
|
205
158
|
});
|
206
159
|
client.on('Runtime.bindingCalled', event => {
|
207
|
-
return __classPrivateFieldGet(this,
|
160
|
+
return __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_onBindingCalled).call(this, event);
|
208
161
|
});
|
209
162
|
client.on('Page.javascriptDialogOpening', event => {
|
210
|
-
return __classPrivateFieldGet(this,
|
163
|
+
return __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_onDialog).call(this, event);
|
211
164
|
});
|
212
165
|
client.on('Runtime.exceptionThrown', exception => {
|
213
|
-
return __classPrivateFieldGet(this,
|
166
|
+
return __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_handleException).call(this, exception.exceptionDetails);
|
214
167
|
});
|
215
168
|
client.on('Inspector.targetCrashed', () => {
|
216
|
-
return __classPrivateFieldGet(this,
|
169
|
+
return __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_onTargetCrashed).call(this);
|
217
170
|
});
|
218
171
|
client.on('Performance.metrics', event => {
|
219
|
-
return __classPrivateFieldGet(this,
|
172
|
+
return __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_emitMetrics).call(this, event);
|
220
173
|
});
|
221
174
|
client.on('Log.entryAdded', event => {
|
222
|
-
return __classPrivateFieldGet(this,
|
175
|
+
return __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_onLogEntryAdded).call(this, event);
|
223
176
|
});
|
224
177
|
client.on('Page.fileChooserOpened', event => {
|
225
|
-
return __classPrivateFieldGet(this,
|
178
|
+
return __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_onFileChooser).call(this, event);
|
226
179
|
});
|
227
|
-
__classPrivateFieldGet(this,
|
228
|
-
__classPrivateFieldGet(this,
|
180
|
+
__classPrivateFieldGet(this, _CDPPage_target, "f")._isClosedPromise.then(() => {
|
181
|
+
__classPrivateFieldGet(this, _CDPPage_target, "f")
|
229
182
|
._targetManager()
|
230
|
-
.removeTargetInterceptor(__classPrivateFieldGet(this,
|
231
|
-
__classPrivateFieldGet(this,
|
183
|
+
.removeTargetInterceptor(__classPrivateFieldGet(this, _CDPPage_client, "f"), __classPrivateFieldGet(this, _CDPPage_onAttachedToTarget, "f"));
|
184
|
+
__classPrivateFieldGet(this, _CDPPage_target, "f")
|
232
185
|
._targetManager()
|
233
|
-
.off("targetGone" /* TargetManagerEmittedEvents.TargetGone */, __classPrivateFieldGet(this,
|
186
|
+
.off("targetGone" /* TargetManagerEmittedEvents.TargetGone */, __classPrivateFieldGet(this, _CDPPage_onDetachedFromTarget, "f"));
|
234
187
|
this.emit("close" /* PageEmittedEvents.Close */);
|
235
|
-
__classPrivateFieldSet(this,
|
188
|
+
__classPrivateFieldSet(this, _CDPPage_closed, true, "f");
|
236
189
|
});
|
237
190
|
}
|
238
191
|
/**
|
239
192
|
* @internal
|
240
193
|
*/
|
241
194
|
static async _create(client, target, ignoreHTTPSErrors, defaultViewport, screenshotTaskQueue) {
|
242
|
-
const page = new
|
243
|
-
await __classPrivateFieldGet(page,
|
195
|
+
const page = new CDPPage(client, target, ignoreHTTPSErrors, screenshotTaskQueue);
|
196
|
+
await __classPrivateFieldGet(page, _CDPPage_instances, "m", _CDPPage_initialize).call(page);
|
244
197
|
if (defaultViewport) {
|
245
|
-
|
198
|
+
try {
|
199
|
+
await page.setViewport(defaultViewport);
|
200
|
+
}
|
201
|
+
catch (err) {
|
202
|
+
if ((0, ErrorLike_js_1.isErrorLike)(err) && (0, Connection_js_1.isTargetClosedError)(err)) {
|
203
|
+
(0, util_js_1.debugError)(err);
|
204
|
+
}
|
205
|
+
else {
|
206
|
+
throw err;
|
207
|
+
}
|
208
|
+
}
|
246
209
|
}
|
247
210
|
return page;
|
248
211
|
}
|
@@ -250,48 +213,13 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
250
213
|
* @returns `true` if drag events are being intercepted, `false` otherwise.
|
251
214
|
*/
|
252
215
|
isDragInterceptionEnabled() {
|
253
|
-
return __classPrivateFieldGet(this,
|
216
|
+
return __classPrivateFieldGet(this, _CDPPage_userDragInterceptionEnabled, "f");
|
254
217
|
}
|
255
218
|
/**
|
256
219
|
* @returns `true` if the page has JavaScript enabled, `false` otherwise.
|
257
220
|
*/
|
258
221
|
isJavaScriptEnabled() {
|
259
|
-
return __classPrivateFieldGet(this,
|
260
|
-
}
|
261
|
-
/**
|
262
|
-
* Listen to page events.
|
263
|
-
*
|
264
|
-
* :::note
|
265
|
-
*
|
266
|
-
* This method exists to define event typings and handle proper wireup of
|
267
|
-
* cooperative request interception. Actual event listening and dispatching is
|
268
|
-
* delegated to {@link EventEmitter}.
|
269
|
-
*
|
270
|
-
* :::
|
271
|
-
*/
|
272
|
-
on(eventName, handler) {
|
273
|
-
if (eventName === 'request') {
|
274
|
-
const wrap = __classPrivateFieldGet(this, _Page_handlerMap, "f").get(handler) ||
|
275
|
-
((event) => {
|
276
|
-
event.enqueueInterceptAction(() => {
|
277
|
-
return handler(event);
|
278
|
-
});
|
279
|
-
});
|
280
|
-
__classPrivateFieldGet(this, _Page_handlerMap, "f").set(handler, wrap);
|
281
|
-
return super.on(eventName, wrap);
|
282
|
-
}
|
283
|
-
return super.on(eventName, handler);
|
284
|
-
}
|
285
|
-
once(eventName, handler) {
|
286
|
-
// Note: this method only exists to define the types; we delegate the impl
|
287
|
-
// to EventEmitter.
|
288
|
-
return super.once(eventName, handler);
|
289
|
-
}
|
290
|
-
off(eventName, handler) {
|
291
|
-
if (eventName === 'request') {
|
292
|
-
handler = __classPrivateFieldGet(this, _Page_handlerMap, "f").get(handler) || handler;
|
293
|
-
}
|
294
|
-
return super.off(eventName, handler);
|
222
|
+
return __classPrivateFieldGet(this, _CDPPage_javascriptEnabled, "f");
|
295
223
|
}
|
296
224
|
/**
|
297
225
|
* This method is typically coupled with an action that triggers file
|
@@ -321,17 +249,26 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
321
249
|
* await fileChooser.accept(['/tmp/myfile.pdf']);
|
322
250
|
* ```
|
323
251
|
*/
|
324
|
-
|
325
|
-
|
326
|
-
|
252
|
+
waitForFileChooser(options = {}) {
|
253
|
+
const needsEnable = __classPrivateFieldGet(this, _CDPPage_fileChooserPromises, "f").size === 0;
|
254
|
+
const { timeout = __classPrivateFieldGet(this, _CDPPage_timeoutSettings, "f").timeout() } = options;
|
255
|
+
const promise = (0, DeferredPromise_js_1.createDeferredPromise)({
|
256
|
+
message: `Waiting for \`FileChooser\` failed: ${timeout}ms exceeded`,
|
257
|
+
timeout,
|
258
|
+
});
|
259
|
+
__classPrivateFieldGet(this, _CDPPage_fileChooserPromises, "f").add(promise);
|
260
|
+
let enablePromise;
|
261
|
+
if (needsEnable) {
|
262
|
+
enablePromise = __classPrivateFieldGet(this, _CDPPage_client, "f").send('Page.setInterceptFileChooserDialog', {
|
327
263
|
enabled: true,
|
328
264
|
});
|
329
265
|
}
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
266
|
+
return Promise.all([promise, enablePromise])
|
267
|
+
.then(([result]) => {
|
268
|
+
return result;
|
269
|
+
})
|
270
|
+
.catch(error => {
|
271
|
+
__classPrivateFieldGet(this, _CDPPage_fileChooserPromises, "f").delete(promise);
|
335
272
|
throw error;
|
336
273
|
});
|
337
274
|
}
|
@@ -359,7 +296,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
359
296
|
if (accuracy < 0) {
|
360
297
|
throw new Error(`Invalid accuracy "${accuracy}": precondition 0 <= ACCURACY failed.`);
|
361
298
|
}
|
362
|
-
await __classPrivateFieldGet(this,
|
299
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.setGeolocationOverride', {
|
363
300
|
longitude,
|
364
301
|
latitude,
|
365
302
|
accuracy,
|
@@ -369,25 +306,25 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
369
306
|
* @returns A target this page was created from.
|
370
307
|
*/
|
371
308
|
target() {
|
372
|
-
return __classPrivateFieldGet(this,
|
309
|
+
return __classPrivateFieldGet(this, _CDPPage_target, "f");
|
373
310
|
}
|
374
311
|
/**
|
375
312
|
* @internal
|
376
313
|
*/
|
377
314
|
_client() {
|
378
|
-
return __classPrivateFieldGet(this,
|
315
|
+
return __classPrivateFieldGet(this, _CDPPage_client, "f");
|
379
316
|
}
|
380
317
|
/**
|
381
318
|
* Get the browser the page belongs to.
|
382
319
|
*/
|
383
320
|
browser() {
|
384
|
-
return __classPrivateFieldGet(this,
|
321
|
+
return __classPrivateFieldGet(this, _CDPPage_target, "f").browser();
|
385
322
|
}
|
386
323
|
/**
|
387
324
|
* Get the browser context that the page belongs to.
|
388
325
|
*/
|
389
326
|
browserContext() {
|
390
|
-
return __classPrivateFieldGet(this,
|
327
|
+
return __classPrivateFieldGet(this, _CDPPage_target, "f").browserContext();
|
391
328
|
}
|
392
329
|
/**
|
393
330
|
* @returns The page's main frame.
|
@@ -396,28 +333,28 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
396
333
|
* Page is guaranteed to have a main frame which persists during navigations.
|
397
334
|
*/
|
398
335
|
mainFrame() {
|
399
|
-
return __classPrivateFieldGet(this,
|
336
|
+
return __classPrivateFieldGet(this, _CDPPage_frameManager, "f").mainFrame();
|
400
337
|
}
|
401
338
|
get keyboard() {
|
402
|
-
return __classPrivateFieldGet(this,
|
339
|
+
return __classPrivateFieldGet(this, _CDPPage_keyboard, "f");
|
403
340
|
}
|
404
341
|
get touchscreen() {
|
405
|
-
return __classPrivateFieldGet(this,
|
342
|
+
return __classPrivateFieldGet(this, _CDPPage_touchscreen, "f");
|
406
343
|
}
|
407
344
|
get coverage() {
|
408
|
-
return __classPrivateFieldGet(this,
|
345
|
+
return __classPrivateFieldGet(this, _CDPPage_coverage, "f");
|
409
346
|
}
|
410
347
|
get tracing() {
|
411
|
-
return __classPrivateFieldGet(this,
|
348
|
+
return __classPrivateFieldGet(this, _CDPPage_tracing, "f");
|
412
349
|
}
|
413
350
|
get accessibility() {
|
414
|
-
return __classPrivateFieldGet(this,
|
351
|
+
return __classPrivateFieldGet(this, _CDPPage_accessibility, "f");
|
415
352
|
}
|
416
353
|
/**
|
417
354
|
* @returns An array of all frames attached to the page.
|
418
355
|
*/
|
419
356
|
frames() {
|
420
|
-
return __classPrivateFieldGet(this,
|
357
|
+
return __classPrivateFieldGet(this, _CDPPage_frameManager, "f").frames();
|
421
358
|
}
|
422
359
|
/**
|
423
360
|
* @returns all of the dedicated {@link
|
@@ -428,7 +365,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
428
365
|
* This does not contain ServiceWorkers
|
429
366
|
*/
|
430
367
|
workers() {
|
431
|
-
return Array.from(__classPrivateFieldGet(this,
|
368
|
+
return Array.from(__classPrivateFieldGet(this, _CDPPage_workers, "f").values());
|
432
369
|
}
|
433
370
|
/**
|
434
371
|
* Activating request interception enables {@link HTTPRequest.abort},
|
@@ -469,7 +406,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
469
406
|
* @param value - Whether to enable request interception.
|
470
407
|
*/
|
471
408
|
async setRequestInterception(value) {
|
472
|
-
return __classPrivateFieldGet(this,
|
409
|
+
return __classPrivateFieldGet(this, _CDPPage_frameManager, "f").networkManager.setRequestInterception(value);
|
473
410
|
}
|
474
411
|
/**
|
475
412
|
* @param enabled - Whether to enable drag interception.
|
@@ -480,44 +417,14 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
480
417
|
* on the page, which can then be used to simulate drag-and-drop.
|
481
418
|
*/
|
482
419
|
async setDragInterception(enabled) {
|
483
|
-
__classPrivateFieldSet(this,
|
484
|
-
return __classPrivateFieldGet(this,
|
420
|
+
__classPrivateFieldSet(this, _CDPPage_userDragInterceptionEnabled, enabled, "f");
|
421
|
+
return __classPrivateFieldGet(this, _CDPPage_client, "f").send('Input.setInterceptDrags', { enabled });
|
485
422
|
}
|
486
|
-
/**
|
487
|
-
* @param enabled - When `true`, enables offline mode for the page.
|
488
|
-
* @remarks
|
489
|
-
* NOTE: while this method sets the network connection to offline, it does
|
490
|
-
* not change the parameters used in [page.emulateNetworkConditions(networkConditions)]
|
491
|
-
* (#pageemulatenetworkconditionsnetworkconditions)
|
492
|
-
*/
|
493
423
|
setOfflineMode(enabled) {
|
494
|
-
return __classPrivateFieldGet(this,
|
424
|
+
return __classPrivateFieldGet(this, _CDPPage_frameManager, "f").networkManager.setOfflineMode(enabled);
|
495
425
|
}
|
496
|
-
/**
|
497
|
-
* @param networkConditions - Passing `null` disables network condition emulation.
|
498
|
-
* @example
|
499
|
-
*
|
500
|
-
* ```ts
|
501
|
-
* const puppeteer = require('puppeteer');
|
502
|
-
* const slow3G = puppeteer.networkConditions['Slow 3G'];
|
503
|
-
*
|
504
|
-
* (async () => {
|
505
|
-
* const browser = await puppeteer.launch();
|
506
|
-
* const page = await browser.newPage();
|
507
|
-
* await page.emulateNetworkConditions(slow3G);
|
508
|
-
* await page.goto('https://www.google.com');
|
509
|
-
* // other actions...
|
510
|
-
* await browser.close();
|
511
|
-
* })();
|
512
|
-
* ```
|
513
|
-
*
|
514
|
-
* @remarks
|
515
|
-
* NOTE: This does not affect WebSockets and WebRTC PeerConnections (see
|
516
|
-
* https://crbug.com/563644). To set the page offline, you can use
|
517
|
-
* [page.setOfflineMode(enabled)](#pagesetofflinemodeenabled).
|
518
|
-
*/
|
519
426
|
emulateNetworkConditions(networkConditions) {
|
520
|
-
return __classPrivateFieldGet(this,
|
427
|
+
return __classPrivateFieldGet(this, _CDPPage_frameManager, "f").networkManager.emulateNetworkConditions(networkConditions);
|
521
428
|
}
|
522
429
|
/**
|
523
430
|
* This setting will change the default maximum navigation time for the
|
@@ -537,13 +444,19 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
537
444
|
* @param timeout - Maximum navigation time in milliseconds.
|
538
445
|
*/
|
539
446
|
setDefaultNavigationTimeout(timeout) {
|
540
|
-
__classPrivateFieldGet(this,
|
447
|
+
__classPrivateFieldGet(this, _CDPPage_timeoutSettings, "f").setDefaultNavigationTimeout(timeout);
|
541
448
|
}
|
542
449
|
/**
|
543
450
|
* @param timeout - Maximum time in milliseconds.
|
544
451
|
*/
|
545
452
|
setDefaultTimeout(timeout) {
|
546
|
-
__classPrivateFieldGet(this,
|
453
|
+
__classPrivateFieldGet(this, _CDPPage_timeoutSettings, "f").setDefaultTimeout(timeout);
|
454
|
+
}
|
455
|
+
/**
|
456
|
+
* @returns Maximum time in milliseconds.
|
457
|
+
*/
|
458
|
+
getDefaultTimeout() {
|
459
|
+
return __classPrivateFieldGet(this, _CDPPage_timeoutSettings, "f").timeout();
|
547
460
|
}
|
548
461
|
/**
|
549
462
|
* Runs `document.querySelector` within the page. If no element matches the
|
@@ -631,11 +544,6 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
631
544
|
* This method iterates the JavaScript heap and finds all objects with the
|
632
545
|
* given prototype.
|
633
546
|
*
|
634
|
-
* @remarks
|
635
|
-
* Shortcut for
|
636
|
-
* {@link ExecutionContext.queryObjects |
|
637
|
-
* page.mainFrame().executionContext().queryObjects(prototypeHandle)}.
|
638
|
-
*
|
639
547
|
* @example
|
640
548
|
*
|
641
549
|
* ```ts
|
@@ -657,7 +565,13 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
657
565
|
*/
|
658
566
|
async queryObjects(prototypeHandle) {
|
659
567
|
const context = await this.mainFrame().executionContext();
|
660
|
-
|
568
|
+
(0, assert_js_1.assert)(!prototypeHandle.disposed, 'Prototype JSHandle is disposed!');
|
569
|
+
const remoteObject = prototypeHandle.remoteObject();
|
570
|
+
(0, assert_js_1.assert)(remoteObject.objectId, 'Prototype JSHandle must not be referencing primitive value');
|
571
|
+
const response = await context._client.send('Runtime.queryObjects', {
|
572
|
+
prototypeObjectId: remoteObject.objectId,
|
573
|
+
});
|
574
|
+
return (0, util_js_1.createJSHandle)(context, response.objects);
|
661
575
|
}
|
662
576
|
/**
|
663
577
|
* This method runs `document.querySelector` within the page and passes the
|
@@ -807,7 +721,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
807
721
|
* URL. If URLs are specified, only cookies for those URLs are returned.
|
808
722
|
*/
|
809
723
|
async cookies(...urls) {
|
810
|
-
const originalCookies = (await __classPrivateFieldGet(this,
|
724
|
+
const originalCookies = (await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Network.getCookies', {
|
811
725
|
urls: urls.length ? urls : [this.url()],
|
812
726
|
})).cookies;
|
813
727
|
const unsupportedCookieAttributes = ['priority'];
|
@@ -826,7 +740,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
826
740
|
if (!cookie.url && pageURL.startsWith('http')) {
|
827
741
|
item.url = pageURL;
|
828
742
|
}
|
829
|
-
await __classPrivateFieldGet(this,
|
743
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Network.deleteCookies', item);
|
830
744
|
}
|
831
745
|
}
|
832
746
|
/**
|
@@ -850,7 +764,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
850
764
|
});
|
851
765
|
await this.deleteCookie(...items);
|
852
766
|
if (items.length) {
|
853
|
-
await __classPrivateFieldGet(this,
|
767
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Network.setCookies', { cookies: items });
|
854
768
|
}
|
855
769
|
}
|
856
770
|
/**
|
@@ -860,18 +774,13 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
860
774
|
* Shortcut for
|
861
775
|
* {@link Frame.addScriptTag | page.mainFrame().addScriptTag(options)}.
|
862
776
|
*
|
863
|
-
* @
|
864
|
-
*
|
777
|
+
* @param options - Options for the script.
|
778
|
+
* @returns An {@link ElementHandle | element handle} to the injected
|
779
|
+
* `<script>` element.
|
865
780
|
*/
|
866
781
|
async addScriptTag(options) {
|
867
782
|
return this.mainFrame().addScriptTag(options);
|
868
783
|
}
|
869
|
-
/**
|
870
|
-
* Adds a `<link rel="stylesheet">` tag into the page with the desired URL or a
|
871
|
-
* `<style type="text/css">` tag with the content.
|
872
|
-
* @returns Promise which resolves to the added tag when the stylesheet's
|
873
|
-
* onload fires or when the CSS content was injected into frame.
|
874
|
-
*/
|
875
784
|
async addStyleTag(options) {
|
876
785
|
return this.mainFrame().addStyleTag(options);
|
877
786
|
}
|
@@ -946,7 +855,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
946
855
|
* context.
|
947
856
|
*/
|
948
857
|
async exposeFunction(name, pptrFunction) {
|
949
|
-
if (__classPrivateFieldGet(this,
|
858
|
+
if (__classPrivateFieldGet(this, _CDPPage_pageBindings, "f").has(name)) {
|
950
859
|
throw new Error(`Failed to add page binding with name ${name}: window['${name}'] already exists!`);
|
951
860
|
}
|
952
861
|
let exposedFunction;
|
@@ -958,10 +867,10 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
958
867
|
exposedFunction = pptrFunction.default;
|
959
868
|
break;
|
960
869
|
}
|
961
|
-
__classPrivateFieldGet(this,
|
870
|
+
__classPrivateFieldGet(this, _CDPPage_pageBindings, "f").set(name, exposedFunction);
|
962
871
|
const expression = (0, util_js_1.pageBindingInitString)('exposedFun', name);
|
963
|
-
await __classPrivateFieldGet(this,
|
964
|
-
await __classPrivateFieldGet(this,
|
872
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Runtime.addBinding', { name: name });
|
873
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Page.addScriptToEvaluateOnNewDocument', {
|
965
874
|
source: expression,
|
966
875
|
});
|
967
876
|
await Promise.all(this.frames().map(frame => {
|
@@ -975,7 +884,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
975
884
|
* To disable authentication, pass `null`.
|
976
885
|
*/
|
977
886
|
async authenticate(credentials) {
|
978
|
-
return __classPrivateFieldGet(this,
|
887
|
+
return __classPrivateFieldGet(this, _CDPPage_frameManager, "f").networkManager.authenticate(credentials);
|
979
888
|
}
|
980
889
|
/**
|
981
890
|
* The extra HTTP headers will be sent with every request the page initiates.
|
@@ -998,7 +907,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
998
907
|
* with every request. All header values must be strings.
|
999
908
|
*/
|
1000
909
|
async setExtraHTTPHeaders(headers) {
|
1001
|
-
return __classPrivateFieldGet(this,
|
910
|
+
return __classPrivateFieldGet(this, _CDPPage_frameManager, "f").networkManager.setExtraHTTPHeaders(headers);
|
1002
911
|
}
|
1003
912
|
/**
|
1004
913
|
* @param userAgent - Specific user agent to use in this page
|
@@ -1007,7 +916,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1007
916
|
* @returns Promise which resolves when the user agent is set.
|
1008
917
|
*/
|
1009
918
|
async setUserAgent(userAgent, userAgentMetadata) {
|
1010
|
-
return __classPrivateFieldGet(this,
|
919
|
+
return __classPrivateFieldGet(this, _CDPPage_frameManager, "f").networkManager.setUserAgent(userAgent, userAgentMetadata);
|
1011
920
|
}
|
1012
921
|
/**
|
1013
922
|
* @returns Object containing metrics as key/value pairs.
|
@@ -1044,8 +953,8 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1044
953
|
* in seconds since an arbitrary point in the past.
|
1045
954
|
*/
|
1046
955
|
async metrics() {
|
1047
|
-
const response = await __classPrivateFieldGet(this,
|
1048
|
-
return __classPrivateFieldGet(this,
|
956
|
+
const response = await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Performance.getMetrics');
|
957
|
+
return __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_buildMetricsObject).call(this, response.metrics);
|
1049
958
|
}
|
1050
959
|
/**
|
1051
960
|
*
|
@@ -1057,7 +966,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1057
966
|
return this.mainFrame().url();
|
1058
967
|
}
|
1059
968
|
async content() {
|
1060
|
-
return await __classPrivateFieldGet(this,
|
969
|
+
return await __classPrivateFieldGet(this, _CDPPage_frameManager, "f").mainFrame().content();
|
1061
970
|
}
|
1062
971
|
/**
|
1063
972
|
* @param html - HTML markup to assign to the page.
|
@@ -1084,7 +993,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1084
993
|
* no more than 2 network connections for at least `500` ms.
|
1085
994
|
*/
|
1086
995
|
async setContent(html, options = {}) {
|
1087
|
-
await __classPrivateFieldGet(this,
|
996
|
+
await __classPrivateFieldGet(this, _CDPPage_frameManager, "f").mainFrame().setContent(html, options);
|
1088
997
|
}
|
1089
998
|
/**
|
1090
999
|
* @param url - URL to navigate page to. The URL should include scheme, e.g.
|
@@ -1141,7 +1050,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1141
1050
|
* Shortcut for {@link Frame.goto | page.mainFrame().goto(url, options)}.
|
1142
1051
|
*/
|
1143
1052
|
async goto(url, options = {}) {
|
1144
|
-
return await __classPrivateFieldGet(this,
|
1053
|
+
return await __classPrivateFieldGet(this, _CDPPage_frameManager, "f").mainFrame().goto(url, options);
|
1145
1054
|
}
|
1146
1055
|
/**
|
1147
1056
|
* @param options - Navigation parameters which might have the following
|
@@ -1172,7 +1081,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1172
1081
|
async reload(options) {
|
1173
1082
|
const result = await Promise.all([
|
1174
1083
|
this.waitForNavigation(options),
|
1175
|
-
__classPrivateFieldGet(this,
|
1084
|
+
__classPrivateFieldGet(this, _CDPPage_client, "f").send('Page.reload'),
|
1176
1085
|
]);
|
1177
1086
|
return result[0];
|
1178
1087
|
}
|
@@ -1204,7 +1113,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1204
1113
|
* API usage, the navigation will resolve with `null`.
|
1205
1114
|
*/
|
1206
1115
|
async waitForNavigation(options = {}) {
|
1207
|
-
return await __classPrivateFieldGet(this,
|
1116
|
+
return await __classPrivateFieldGet(this, _CDPPage_frameManager, "f").mainFrame().waitForNavigation(options);
|
1208
1117
|
}
|
1209
1118
|
/**
|
1210
1119
|
* @param urlOrPredicate - A URL or predicate to wait for
|
@@ -1234,16 +1143,16 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1234
1143
|
* {@link Page.setDefaultTimeout} method.
|
1235
1144
|
*/
|
1236
1145
|
async waitForRequest(urlOrPredicate, options = {}) {
|
1237
|
-
const { timeout = __classPrivateFieldGet(this,
|
1238
|
-
return (0, util_js_1.waitForEvent)(__classPrivateFieldGet(this,
|
1146
|
+
const { timeout = __classPrivateFieldGet(this, _CDPPage_timeoutSettings, "f").timeout() } = options;
|
1147
|
+
return (0, util_js_1.waitForEvent)(__classPrivateFieldGet(this, _CDPPage_frameManager, "f").networkManager, NetworkManager_js_1.NetworkManagerEmittedEvents.Request, async (request) => {
|
1239
1148
|
if ((0, util_js_1.isString)(urlOrPredicate)) {
|
1240
1149
|
return urlOrPredicate === request.url();
|
1241
1150
|
}
|
1242
1151
|
if (typeof urlOrPredicate === 'function') {
|
1243
|
-
return !!urlOrPredicate(request);
|
1152
|
+
return !!(await urlOrPredicate(request));
|
1244
1153
|
}
|
1245
1154
|
return false;
|
1246
|
-
}, timeout, __classPrivateFieldGet(this,
|
1155
|
+
}, timeout, __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_sessionClosePromise).call(this));
|
1247
1156
|
}
|
1248
1157
|
/**
|
1249
1158
|
* @param urlOrPredicate - A URL or predicate to wait for.
|
@@ -1273,8 +1182,8 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1273
1182
|
* the {@link Page.setDefaultTimeout} method.
|
1274
1183
|
*/
|
1275
1184
|
async waitForResponse(urlOrPredicate, options = {}) {
|
1276
|
-
const { timeout = __classPrivateFieldGet(this,
|
1277
|
-
return (0, util_js_1.waitForEvent)(__classPrivateFieldGet(this,
|
1185
|
+
const { timeout = __classPrivateFieldGet(this, _CDPPage_timeoutSettings, "f").timeout() } = options;
|
1186
|
+
return (0, util_js_1.waitForEvent)(__classPrivateFieldGet(this, _CDPPage_frameManager, "f").networkManager, NetworkManager_js_1.NetworkManagerEmittedEvents.Response, async (response) => {
|
1278
1187
|
if ((0, util_js_1.isString)(urlOrPredicate)) {
|
1279
1188
|
return urlOrPredicate === response.url();
|
1280
1189
|
}
|
@@ -1282,15 +1191,15 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1282
1191
|
return !!(await urlOrPredicate(response));
|
1283
1192
|
}
|
1284
1193
|
return false;
|
1285
|
-
}, timeout, __classPrivateFieldGet(this,
|
1194
|
+
}, timeout, __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_sessionClosePromise).call(this));
|
1286
1195
|
}
|
1287
1196
|
/**
|
1288
1197
|
* @param options - Optional waiting parameters
|
1289
1198
|
* @returns Promise which resolves when network is idle
|
1290
1199
|
*/
|
1291
1200
|
async waitForNetworkIdle(options = {}) {
|
1292
|
-
const { idleTime = 500, timeout = __classPrivateFieldGet(this,
|
1293
|
-
const networkManager = __classPrivateFieldGet(this,
|
1201
|
+
const { idleTime = 500, timeout = __classPrivateFieldGet(this, _CDPPage_timeoutSettings, "f").timeout() } = options;
|
1202
|
+
const networkManager = __classPrivateFieldGet(this, _CDPPage_frameManager, "f").networkManager;
|
1294
1203
|
let idleResolveCallback;
|
1295
1204
|
const idlePromise = new Promise(resolve => {
|
1296
1205
|
idleResolveCallback = resolve;
|
@@ -1328,7 +1237,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1328
1237
|
await Promise.race([
|
1329
1238
|
idlePromise,
|
1330
1239
|
...eventPromises,
|
1331
|
-
__classPrivateFieldGet(this,
|
1240
|
+
__classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_sessionClosePromise).call(this),
|
1332
1241
|
]).then(r => {
|
1333
1242
|
cleanup();
|
1334
1243
|
return r;
|
@@ -1357,7 +1266,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1357
1266
|
* the {@link Page.setDefaultTimeout} method.
|
1358
1267
|
*/
|
1359
1268
|
async waitForFrame(urlOrPredicate, options = {}) {
|
1360
|
-
const { timeout = __classPrivateFieldGet(this,
|
1269
|
+
const { timeout = __classPrivateFieldGet(this, _CDPPage_timeoutSettings, "f").timeout() } = options;
|
1361
1270
|
let predicate;
|
1362
1271
|
if ((0, util_js_1.isString)(urlOrPredicate)) {
|
1363
1272
|
predicate = (frame) => {
|
@@ -1374,8 +1283,8 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1374
1283
|
};
|
1375
1284
|
}
|
1376
1285
|
const eventRace = Promise.race([
|
1377
|
-
(0, util_js_1.waitForEvent)(__classPrivateFieldGet(this,
|
1378
|
-
(0, util_js_1.waitForEvent)(__classPrivateFieldGet(this,
|
1286
|
+
(0, util_js_1.waitForEvent)(__classPrivateFieldGet(this, _CDPPage_frameManager, "f"), FrameManager_js_1.FrameManagerEmittedEvents.FrameAttached, predicate, timeout, __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_sessionClosePromise).call(this)),
|
1287
|
+
(0, util_js_1.waitForEvent)(__classPrivateFieldGet(this, _CDPPage_frameManager, "f"), FrameManager_js_1.FrameManagerEmittedEvents.FrameNavigated, predicate, timeout, __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_sessionClosePromise).call(this)),
|
1379
1288
|
...this.frames().map(async (frame) => {
|
1380
1289
|
if (await predicate(frame)) {
|
1381
1290
|
return frame;
|
@@ -1412,7 +1321,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1412
1321
|
* more than 2 network connections for at least `500` ms.
|
1413
1322
|
*/
|
1414
1323
|
async goBack(options = {}) {
|
1415
|
-
return __classPrivateFieldGet(this,
|
1324
|
+
return __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_go).call(this, -1, options);
|
1416
1325
|
}
|
1417
1326
|
/**
|
1418
1327
|
* This method navigate to the next page in history.
|
@@ -1441,47 +1350,13 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1441
1350
|
* more than 2 network connections for at least `500` ms.
|
1442
1351
|
*/
|
1443
1352
|
async goForward(options = {}) {
|
1444
|
-
return __classPrivateFieldGet(this,
|
1353
|
+
return __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_go).call(this, +1, options);
|
1445
1354
|
}
|
1446
1355
|
/**
|
1447
1356
|
* Brings page to front (activates tab).
|
1448
1357
|
*/
|
1449
1358
|
async bringToFront() {
|
1450
|
-
await __classPrivateFieldGet(this,
|
1451
|
-
}
|
1452
|
-
/**
|
1453
|
-
* Emulates given device metrics and user agent.
|
1454
|
-
*
|
1455
|
-
* @remarks
|
1456
|
-
* This method is a shortcut for calling two methods:
|
1457
|
-
* {@link Page.setUserAgent} and {@link Page.setViewport} To aid emulation,
|
1458
|
-
* Puppeteer provides a list of device descriptors that can be obtained via
|
1459
|
-
* {@link devices}. `page.emulate` will resize the page. A lot of websites
|
1460
|
-
* don't expect phones to change size, so you should emulate before navigating
|
1461
|
-
* to the page.
|
1462
|
-
* @example
|
1463
|
-
*
|
1464
|
-
* ```ts
|
1465
|
-
* const puppeteer = require('puppeteer');
|
1466
|
-
* const iPhone = puppeteer.devices['iPhone 6'];
|
1467
|
-
* (async () => {
|
1468
|
-
* const browser = await puppeteer.launch();
|
1469
|
-
* const page = await browser.newPage();
|
1470
|
-
* await page.emulate(iPhone);
|
1471
|
-
* await page.goto('https://www.google.com');
|
1472
|
-
* // other actions...
|
1473
|
-
* await browser.close();
|
1474
|
-
* })();
|
1475
|
-
* ```
|
1476
|
-
*
|
1477
|
-
* @remarks List of all available devices is available in the source code:
|
1478
|
-
* {@link https://github.com/puppeteer/puppeteer/blob/main/src/common/DeviceDescriptors.ts | src/common/DeviceDescriptors.ts}.
|
1479
|
-
*/
|
1480
|
-
async emulate(options) {
|
1481
|
-
await Promise.all([
|
1482
|
-
this.setViewport(options.viewport),
|
1483
|
-
this.setUserAgent(options.userAgent),
|
1484
|
-
]);
|
1359
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Page.bringToFront');
|
1485
1360
|
}
|
1486
1361
|
/**
|
1487
1362
|
* @param enabled - Whether or not to enable JavaScript on the page.
|
@@ -1491,11 +1366,11 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1491
1366
|
* It will take full effect on the next navigation.
|
1492
1367
|
*/
|
1493
1368
|
async setJavaScriptEnabled(enabled) {
|
1494
|
-
if (__classPrivateFieldGet(this,
|
1369
|
+
if (__classPrivateFieldGet(this, _CDPPage_javascriptEnabled, "f") === enabled) {
|
1495
1370
|
return;
|
1496
1371
|
}
|
1497
|
-
__classPrivateFieldSet(this,
|
1498
|
-
await __classPrivateFieldGet(this,
|
1372
|
+
__classPrivateFieldSet(this, _CDPPage_javascriptEnabled, enabled, "f");
|
1373
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.setScriptExecutionDisabled', {
|
1499
1374
|
value: !enabled,
|
1500
1375
|
});
|
1501
1376
|
}
|
@@ -1508,7 +1383,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1508
1383
|
* before navigating to the domain.
|
1509
1384
|
*/
|
1510
1385
|
async setBypassCSP(enabled) {
|
1511
|
-
await __classPrivateFieldGet(this,
|
1386
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Page.setBypassCSP', { enabled });
|
1512
1387
|
}
|
1513
1388
|
/**
|
1514
1389
|
* @param type - Changes the CSS media type of the page. The only allowed
|
@@ -1539,7 +1414,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1539
1414
|
(0, assert_js_1.assert)(type === 'screen' ||
|
1540
1415
|
type === 'print' ||
|
1541
1416
|
(type !== null && type !== void 0 ? type : undefined) === undefined, 'Unsupported media type: ' + type);
|
1542
|
-
await __classPrivateFieldGet(this,
|
1417
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.setEmulatedMedia', {
|
1543
1418
|
media: type || '',
|
1544
1419
|
});
|
1545
1420
|
}
|
@@ -1549,7 +1424,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1549
1424
|
*/
|
1550
1425
|
async emulateCPUThrottling(factor) {
|
1551
1426
|
(0, assert_js_1.assert)(factor === null || factor >= 1, 'Throttling rate should be greater or equal to 1');
|
1552
|
-
await __classPrivateFieldGet(this,
|
1427
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.setCPUThrottlingRate', {
|
1553
1428
|
rate: factor !== null ? factor : 1,
|
1554
1429
|
});
|
1555
1430
|
}
|
@@ -1616,14 +1491,14 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1616
1491
|
*/
|
1617
1492
|
async emulateMediaFeatures(features) {
|
1618
1493
|
if (!features) {
|
1619
|
-
await __classPrivateFieldGet(this,
|
1494
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.setEmulatedMedia', {});
|
1620
1495
|
}
|
1621
1496
|
if (Array.isArray(features)) {
|
1622
1497
|
for (const mediaFeature of features) {
|
1623
1498
|
const name = mediaFeature.name;
|
1624
1499
|
(0, assert_js_1.assert)(/^(?:prefers-(?:color-scheme|reduced-motion)|color-gamut)$/.test(name), 'Unsupported media feature: ' + name);
|
1625
1500
|
}
|
1626
|
-
await __classPrivateFieldGet(this,
|
1501
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.setEmulatedMedia', {
|
1627
1502
|
features: features,
|
1628
1503
|
});
|
1629
1504
|
}
|
@@ -1636,7 +1511,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1636
1511
|
*/
|
1637
1512
|
async emulateTimezone(timezoneId) {
|
1638
1513
|
try {
|
1639
|
-
await __classPrivateFieldGet(this,
|
1514
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.setTimezoneOverride', {
|
1640
1515
|
timezoneId: timezoneId || '',
|
1641
1516
|
});
|
1642
1517
|
}
|
@@ -1668,13 +1543,13 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1668
1543
|
*/
|
1669
1544
|
async emulateIdleState(overrides) {
|
1670
1545
|
if (overrides) {
|
1671
|
-
await __classPrivateFieldGet(this,
|
1546
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.setIdleOverride', {
|
1672
1547
|
isUserActive: overrides.isUserActive,
|
1673
1548
|
isScreenUnlocked: overrides.isScreenUnlocked,
|
1674
1549
|
});
|
1675
1550
|
}
|
1676
1551
|
else {
|
1677
|
-
await __classPrivateFieldGet(this,
|
1552
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.clearIdleOverride');
|
1678
1553
|
}
|
1679
1554
|
}
|
1680
1555
|
/**
|
@@ -1716,7 +1591,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1716
1591
|
]);
|
1717
1592
|
try {
|
1718
1593
|
(0, assert_js_1.assert)(!type || visionDeficiencies.has(type), `Unsupported vision deficiency: ${type}`);
|
1719
|
-
await __classPrivateFieldGet(this,
|
1594
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.setEmulatedVisionDeficiency', {
|
1720
1595
|
type: type || 'none',
|
1721
1596
|
});
|
1722
1597
|
}
|
@@ -1765,8 +1640,8 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1765
1640
|
* set the isMobile or hasTouch properties.
|
1766
1641
|
*/
|
1767
1642
|
async setViewport(viewport) {
|
1768
|
-
const needsReload = await __classPrivateFieldGet(this,
|
1769
|
-
__classPrivateFieldSet(this,
|
1643
|
+
const needsReload = await __classPrivateFieldGet(this, _CDPPage_emulationManager, "f").emulateViewport(viewport);
|
1644
|
+
__classPrivateFieldSet(this, _CDPPage_viewport, viewport, "f");
|
1770
1645
|
if (needsReload) {
|
1771
1646
|
await this.reload();
|
1772
1647
|
}
|
@@ -1791,7 +1666,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1791
1666
|
* `false`.
|
1792
1667
|
*/
|
1793
1668
|
viewport() {
|
1794
|
-
return __classPrivateFieldGet(this,
|
1669
|
+
return __classPrivateFieldGet(this, _CDPPage_viewport, "f");
|
1795
1670
|
}
|
1796
1671
|
/**
|
1797
1672
|
* Evaluates a function in the page's context and returns the result.
|
@@ -1841,7 +1716,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1841
1716
|
* @returns the return value of `pageFunction`.
|
1842
1717
|
*/
|
1843
1718
|
async evaluate(pageFunction, ...args) {
|
1844
|
-
return __classPrivateFieldGet(this,
|
1719
|
+
return __classPrivateFieldGet(this, _CDPPage_frameManager, "f").mainFrame().evaluate(pageFunction, ...args);
|
1845
1720
|
}
|
1846
1721
|
/**
|
1847
1722
|
* Adds a function which would be invoked in one of the following scenarios:
|
@@ -1864,20 +1739,20 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1864
1739
|
*
|
1865
1740
|
* // overwrite the `languages` property to use a custom getter
|
1866
1741
|
* Object.defineProperty(navigator, 'languages', {
|
1867
|
-
*
|
1868
|
-
*
|
1869
|
-
*
|
1742
|
+
* get: function () {
|
1743
|
+
* return ['en-US', 'en', 'bn'];
|
1744
|
+
* },
|
1870
1745
|
* });
|
1871
1746
|
*
|
1872
1747
|
* // In your puppeteer script, assuming the preload.js file is
|
1873
|
-
* in same folder of our script
|
1748
|
+
* // in same folder of our script.
|
1874
1749
|
* const preloadFile = fs.readFileSync('./preload.js', 'utf8');
|
1875
1750
|
* await page.evaluateOnNewDocument(preloadFile);
|
1876
1751
|
* ```
|
1877
1752
|
*/
|
1878
1753
|
async evaluateOnNewDocument(pageFunction, ...args) {
|
1879
1754
|
const source = (0, util_js_1.evaluationString)(pageFunction, ...args);
|
1880
|
-
await __classPrivateFieldGet(this,
|
1755
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Page.addScriptToEvaluateOnNewDocument', {
|
1881
1756
|
source,
|
1882
1757
|
});
|
1883
1758
|
}
|
@@ -1887,7 +1762,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1887
1762
|
* @param enabled - sets the `enabled` state of cache
|
1888
1763
|
*/
|
1889
1764
|
async setCacheEnabled(enabled = true) {
|
1890
|
-
await __classPrivateFieldGet(this,
|
1765
|
+
await __classPrivateFieldGet(this, _CDPPage_frameManager, "f").networkManager.setCacheEnabled(enabled);
|
1891
1766
|
}
|
1892
1767
|
/**
|
1893
1768
|
* @remarks
|
@@ -1991,8 +1866,8 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
1991
1866
|
(0, assert_js_1.assert)(options.clip.width !== 0, 'Expected options.clip.width not to be 0.');
|
1992
1867
|
(0, assert_js_1.assert)(options.clip.height !== 0, 'Expected options.clip.height not to be 0.');
|
1993
1868
|
}
|
1994
|
-
return __classPrivateFieldGet(this,
|
1995
|
-
return __classPrivateFieldGet(this,
|
1869
|
+
return __classPrivateFieldGet(this, _CDPPage_screenshotTaskQueue, "f").postTask(() => {
|
1870
|
+
return __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_screenshotTask).call(this, screenshotType, options);
|
1996
1871
|
});
|
1997
1872
|
}
|
1998
1873
|
/**
|
@@ -2032,9 +1907,9 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
2032
1907
|
const marginBottom = convertPrintParameterToInches(margin.bottom) || 0;
|
2033
1908
|
const marginRight = convertPrintParameterToInches(margin.right) || 0;
|
2034
1909
|
if (omitBackground) {
|
2035
|
-
await __classPrivateFieldGet(this,
|
1910
|
+
await __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_setTransparentBackgroundColor).call(this);
|
2036
1911
|
}
|
2037
|
-
const printCommandPromise = __classPrivateFieldGet(this,
|
1912
|
+
const printCommandPromise = __classPrivateFieldGet(this, _CDPPage_client, "f").send('Page.printToPDF', {
|
2038
1913
|
transferMode: 'ReturnAsStream',
|
2039
1914
|
landscape,
|
2040
1915
|
displayHeaderFooter,
|
@@ -2053,10 +1928,10 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
2053
1928
|
});
|
2054
1929
|
const result = await (0, util_js_1.waitWithTimeout)(printCommandPromise, 'Page.printToPDF', timeout);
|
2055
1930
|
if (omitBackground) {
|
2056
|
-
await __classPrivateFieldGet(this,
|
1931
|
+
await __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_resetDefaultBackgroundColor).call(this);
|
2057
1932
|
}
|
2058
1933
|
(0, assert_js_1.assert)(result.stream, '`stream` is missing from `Page.printToPDF');
|
2059
|
-
return (0, util_js_1.getReadableFromProtocolStream)(__classPrivateFieldGet(this,
|
1934
|
+
return (0, util_js_1.getReadableFromProtocolStream)(__classPrivateFieldGet(this, _CDPPage_client, "f"), result.stream);
|
2060
1935
|
}
|
2061
1936
|
/**
|
2062
1937
|
* @param options -
|
@@ -2078,17 +1953,17 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
2078
1953
|
return this.mainFrame().title();
|
2079
1954
|
}
|
2080
1955
|
async close(options = { runBeforeUnload: undefined }) {
|
2081
|
-
const connection = __classPrivateFieldGet(this,
|
1956
|
+
const connection = __classPrivateFieldGet(this, _CDPPage_client, "f").connection();
|
2082
1957
|
(0, assert_js_1.assert)(connection, 'Protocol error: Connection closed. Most likely the page has been closed.');
|
2083
1958
|
const runBeforeUnload = !!options.runBeforeUnload;
|
2084
1959
|
if (runBeforeUnload) {
|
2085
|
-
await __classPrivateFieldGet(this,
|
1960
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Page.close');
|
2086
1961
|
}
|
2087
1962
|
else {
|
2088
1963
|
await connection.send('Target.closeTarget', {
|
2089
|
-
targetId: __classPrivateFieldGet(this,
|
1964
|
+
targetId: __classPrivateFieldGet(this, _CDPPage_target, "f")._targetId,
|
2090
1965
|
});
|
2091
|
-
await __classPrivateFieldGet(this,
|
1966
|
+
await __classPrivateFieldGet(this, _CDPPage_target, "f")._isClosedPromise;
|
2092
1967
|
}
|
2093
1968
|
}
|
2094
1969
|
/**
|
@@ -2096,10 +1971,10 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
2096
1971
|
* @returns
|
2097
1972
|
*/
|
2098
1973
|
isClosed() {
|
2099
|
-
return __classPrivateFieldGet(this,
|
1974
|
+
return __classPrivateFieldGet(this, _CDPPage_closed, "f");
|
2100
1975
|
}
|
2101
1976
|
get mouse() {
|
2102
|
-
return __classPrivateFieldGet(this,
|
1977
|
+
return __classPrivateFieldGet(this, _CDPPage_mouse, "f");
|
2103
1978
|
}
|
2104
1979
|
/**
|
2105
1980
|
* This method fetches an element with `selector`, scrolls it into view if
|
@@ -2231,7 +2106,7 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
2231
2106
|
return this.mainFrame().type(selector, text, options);
|
2232
2107
|
}
|
2233
2108
|
/**
|
2234
|
-
* @deprecated
|
2109
|
+
* @deprecated Replace with `new Promise(r => setTimeout(r, milliseconds));`.
|
2235
2110
|
*
|
2236
2111
|
* Causes your script to wait for the given number of milliseconds.
|
2237
2112
|
*
|
@@ -2414,65 +2289,60 @@ class Page extends EventEmitter_js_1.EventEmitter {
|
|
2414
2289
|
* ```
|
2415
2290
|
*
|
2416
2291
|
* @param pageFunction - Function to be evaluated in browser context
|
2417
|
-
* @param options -
|
2418
|
-
*
|
2419
|
-
* - `polling` - An interval at which the `pageFunction` is executed, defaults
|
2420
|
-
* to `raf`. If `polling` is a number, then it is treated as an interval in
|
2421
|
-
* milliseconds at which the function would be executed. If polling is a
|
2422
|
-
* string, then it can be one of the following values:
|
2423
|
-
* - `raf` - to constantly execute `pageFunction` in
|
2424
|
-
* `requestAnimationFrame` callback. This is the tightest polling mode
|
2425
|
-
* which is suitable to observe styling changes.
|
2426
|
-
* - `mutation`- to execute pageFunction on every DOM mutation.
|
2427
|
-
* - `timeout` - maximum time to wait for in milliseconds. Defaults to `30000`
|
2428
|
-
* (30 seconds). Pass `0` to disable timeout. The default value can be
|
2429
|
-
* changed by using the {@link Page.setDefaultTimeout} method.
|
2430
|
-
* @param args - Arguments to pass to `pageFunction`
|
2431
|
-
* @returns A `Promise` which resolves to a JSHandle/ElementHandle of the the
|
2432
|
-
* `pageFunction`'s return value.
|
2292
|
+
* @param options - Options for configuring waiting behavior.
|
2433
2293
|
*/
|
2434
2294
|
waitForFunction(pageFunction, options = {}, ...args) {
|
2435
2295
|
return this.mainFrame().waitForFunction(pageFunction, options, ...args);
|
2436
2296
|
}
|
2437
2297
|
}
|
2438
|
-
exports.
|
2439
|
-
|
2440
|
-
|
2441
|
-
|
2442
|
-
|
2443
|
-
|
2444
|
-
|
2445
|
-
|
2446
|
-
|
2298
|
+
exports.CDPPage = CDPPage;
|
2299
|
+
_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() {
|
2300
|
+
try {
|
2301
|
+
await Promise.all([
|
2302
|
+
__classPrivateFieldGet(this, _CDPPage_frameManager, "f").initialize(),
|
2303
|
+
__classPrivateFieldGet(this, _CDPPage_client, "f").send('Performance.enable'),
|
2304
|
+
__classPrivateFieldGet(this, _CDPPage_client, "f").send('Log.enable'),
|
2305
|
+
]);
|
2306
|
+
}
|
2307
|
+
catch (err) {
|
2308
|
+
if ((0, ErrorLike_js_1.isErrorLike)(err) && (0, Connection_js_1.isTargetClosedError)(err)) {
|
2309
|
+
(0, util_js_1.debugError)(err);
|
2310
|
+
}
|
2311
|
+
else {
|
2312
|
+
throw err;
|
2313
|
+
}
|
2314
|
+
}
|
2315
|
+
}, _CDPPage_onFileChooser = async function _CDPPage_onFileChooser(event) {
|
2316
|
+
if (!__classPrivateFieldGet(this, _CDPPage_fileChooserPromises, "f").size) {
|
2447
2317
|
return;
|
2448
2318
|
}
|
2449
|
-
const frame = __classPrivateFieldGet(this,
|
2319
|
+
const frame = __classPrivateFieldGet(this, _CDPPage_frameManager, "f").frame(event.frameId);
|
2450
2320
|
(0, assert_js_1.assert)(frame, 'This should never happen.');
|
2451
2321
|
// This is guaranteed to be an HTMLInputElement handle by the event.
|
2452
2322
|
const handle = (await frame.worlds[IsolatedWorld_js_1.MAIN_WORLD].adoptBackendNode(event.backendNodeId));
|
2453
2323
|
const fileChooser = new FileChooser_js_1.FileChooser(handle, event);
|
2454
|
-
for (const promise of __classPrivateFieldGet(this,
|
2324
|
+
for (const promise of __classPrivateFieldGet(this, _CDPPage_fileChooserPromises, "f")) {
|
2455
2325
|
promise.resolve(fileChooser);
|
2456
2326
|
}
|
2457
|
-
__classPrivateFieldGet(this,
|
2458
|
-
},
|
2327
|
+
__classPrivateFieldGet(this, _CDPPage_fileChooserPromises, "f").clear();
|
2328
|
+
}, _CDPPage_onTargetCrashed = function _CDPPage_onTargetCrashed() {
|
2459
2329
|
this.emit('error', new Error('Page crashed!'));
|
2460
|
-
},
|
2330
|
+
}, _CDPPage_onLogEntryAdded = function _CDPPage_onLogEntryAdded(event) {
|
2461
2331
|
const { level, text, args, source, url, lineNumber } = event.entry;
|
2462
2332
|
if (args) {
|
2463
2333
|
args.map(arg => {
|
2464
|
-
return (0, util_js_1.releaseObject)(__classPrivateFieldGet(this,
|
2334
|
+
return (0, util_js_1.releaseObject)(__classPrivateFieldGet(this, _CDPPage_client, "f"), arg);
|
2465
2335
|
});
|
2466
2336
|
}
|
2467
2337
|
if (source !== 'worker') {
|
2468
2338
|
this.emit("console" /* PageEmittedEvents.Console */, new ConsoleMessage_js_1.ConsoleMessage(level, text, [], [{ url, lineNumber }]));
|
2469
2339
|
}
|
2470
|
-
},
|
2340
|
+
}, _CDPPage_emitMetrics = function _CDPPage_emitMetrics(event) {
|
2471
2341
|
this.emit("metrics" /* PageEmittedEvents.Metrics */, {
|
2472
2342
|
title: event.title,
|
2473
|
-
metrics: __classPrivateFieldGet(this,
|
2343
|
+
metrics: __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_buildMetricsObject).call(this, event.metrics),
|
2474
2344
|
});
|
2475
|
-
},
|
2345
|
+
}, _CDPPage_buildMetricsObject = function _CDPPage_buildMetricsObject(metrics) {
|
2476
2346
|
const result = {};
|
2477
2347
|
for (const metric of metrics || []) {
|
2478
2348
|
if (supportedMetrics.has(metric.name)) {
|
@@ -2480,12 +2350,12 @@ _Page_closed = new WeakMap(), _Page_client = new WeakMap(), _Page_target = new W
|
|
2480
2350
|
}
|
2481
2351
|
}
|
2482
2352
|
return result;
|
2483
|
-
},
|
2353
|
+
}, _CDPPage_handleException = function _CDPPage_handleException(exceptionDetails) {
|
2484
2354
|
const message = (0, util_js_1.getExceptionMessage)(exceptionDetails);
|
2485
2355
|
const err = new Error(message);
|
2486
2356
|
err.stack = ''; // Don't report clientside error with a node stack attached
|
2487
2357
|
this.emit("pageerror" /* PageEmittedEvents.PageError */, err);
|
2488
|
-
},
|
2358
|
+
}, _CDPPage_onConsoleAPI = async function _CDPPage_onConsoleAPI(event) {
|
2489
2359
|
if (event.executionContextId === 0) {
|
2490
2360
|
// DevTools protocol stores the last 1000 console messages. These
|
2491
2361
|
// messages are always reported even for removed execution contexts. In
|
@@ -2502,12 +2372,12 @@ _Page_closed = new WeakMap(), _Page_client = new WeakMap(), _Page_target = new W
|
|
2502
2372
|
// @see https://github.com/puppeteer/puppeteer/issues/3865
|
2503
2373
|
return;
|
2504
2374
|
}
|
2505
|
-
const context = __classPrivateFieldGet(this,
|
2375
|
+
const context = __classPrivateFieldGet(this, _CDPPage_frameManager, "f").executionContextById(event.executionContextId, __classPrivateFieldGet(this, _CDPPage_client, "f"));
|
2506
2376
|
const values = event.args.map(arg => {
|
2507
2377
|
return (0, util_js_1.createJSHandle)(context, arg);
|
2508
2378
|
});
|
2509
|
-
__classPrivateFieldGet(this,
|
2510
|
-
},
|
2379
|
+
__classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_addConsoleMessage).call(this, event.type, values, event.stackTrace);
|
2380
|
+
}, _CDPPage_onBindingCalled = async function _CDPPage_onBindingCalled(event) {
|
2511
2381
|
let payload;
|
2512
2382
|
try {
|
2513
2383
|
payload = JSON.parse(event.payload);
|
@@ -2518,12 +2388,12 @@ _Page_closed = new WeakMap(), _Page_client = new WeakMap(), _Page_target = new W
|
|
2518
2388
|
return;
|
2519
2389
|
}
|
2520
2390
|
const { type, name, seq, args } = payload;
|
2521
|
-
if (type !== 'exposedFun' || !__classPrivateFieldGet(this,
|
2391
|
+
if (type !== 'exposedFun' || !__classPrivateFieldGet(this, _CDPPage_pageBindings, "f").has(name)) {
|
2522
2392
|
return;
|
2523
2393
|
}
|
2524
2394
|
let expression = null;
|
2525
2395
|
try {
|
2526
|
-
const pageBinding = __classPrivateFieldGet(this,
|
2396
|
+
const pageBinding = __classPrivateFieldGet(this, _CDPPage_pageBindings, "f").get(name);
|
2527
2397
|
(0, assert_js_1.assert)(pageBinding);
|
2528
2398
|
const result = await pageBinding(...args);
|
2529
2399
|
expression = (0, util_js_1.pageBindingDeliverResultString)(name, seq, result);
|
@@ -2536,13 +2406,13 @@ _Page_closed = new WeakMap(), _Page_client = new WeakMap(), _Page_target = new W
|
|
2536
2406
|
expression = (0, util_js_1.pageBindingDeliverErrorValueString)(name, seq, error);
|
2537
2407
|
}
|
2538
2408
|
}
|
2539
|
-
__classPrivateFieldGet(this,
|
2409
|
+
__classPrivateFieldGet(this, _CDPPage_client, "f")
|
2540
2410
|
.send('Runtime.evaluate', {
|
2541
2411
|
expression,
|
2542
2412
|
contextId: event.executionContextId,
|
2543
2413
|
})
|
2544
2414
|
.catch(util_js_1.debugError);
|
2545
|
-
},
|
2415
|
+
}, _CDPPage_addConsoleMessage = function _CDPPage_addConsoleMessage(eventType, args, stackTrace) {
|
2546
2416
|
if (!this.listenerCount("console" /* PageEmittedEvents.Console */)) {
|
2547
2417
|
args.forEach(arg => {
|
2548
2418
|
return arg.dispose();
|
@@ -2571,7 +2441,7 @@ _Page_closed = new WeakMap(), _Page_client = new WeakMap(), _Page_target = new W
|
|
2571
2441
|
}
|
2572
2442
|
const message = new ConsoleMessage_js_1.ConsoleMessage(eventType, textTokens.join(' '), args, stackTraceLocations);
|
2573
2443
|
this.emit("console" /* PageEmittedEvents.Console */, message);
|
2574
|
-
},
|
2444
|
+
}, _CDPPage_onDialog = function _CDPPage_onDialog(event) {
|
2575
2445
|
let dialogType = null;
|
2576
2446
|
const validDialogTypes = new Set([
|
2577
2447
|
'alert',
|
@@ -2583,65 +2453,62 @@ _Page_closed = new WeakMap(), _Page_client = new WeakMap(), _Page_target = new W
|
|
2583
2453
|
dialogType = event.type;
|
2584
2454
|
}
|
2585
2455
|
(0, assert_js_1.assert)(dialogType, 'Unknown javascript dialog type: ' + event.type);
|
2586
|
-
const dialog = new Dialog_js_1.Dialog(__classPrivateFieldGet(this,
|
2456
|
+
const dialog = new Dialog_js_1.Dialog(__classPrivateFieldGet(this, _CDPPage_client, "f"), dialogType, event.message, event.defaultPrompt);
|
2587
2457
|
this.emit("dialog" /* PageEmittedEvents.Dialog */, dialog);
|
2588
|
-
},
|
2458
|
+
}, _CDPPage_resetDefaultBackgroundColor =
|
2589
2459
|
/**
|
2590
2460
|
* Resets default white background
|
2591
2461
|
*/
|
2592
|
-
async function
|
2593
|
-
await __classPrivateFieldGet(this,
|
2594
|
-
},
|
2462
|
+
async function _CDPPage_resetDefaultBackgroundColor() {
|
2463
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.setDefaultBackgroundColorOverride');
|
2464
|
+
}, _CDPPage_setTransparentBackgroundColor =
|
2595
2465
|
/**
|
2596
2466
|
* Hides default white background
|
2597
2467
|
*/
|
2598
|
-
async function
|
2599
|
-
await __classPrivateFieldGet(this,
|
2468
|
+
async function _CDPPage_setTransparentBackgroundColor() {
|
2469
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.setDefaultBackgroundColorOverride', {
|
2600
2470
|
color: { r: 0, g: 0, b: 0, a: 0 },
|
2601
2471
|
});
|
2602
|
-
},
|
2603
|
-
if (!__classPrivateFieldGet(this,
|
2604
|
-
__classPrivateFieldSet(this,
|
2605
|
-
return __classPrivateFieldGet(this,
|
2472
|
+
}, _CDPPage_sessionClosePromise = function _CDPPage_sessionClosePromise() {
|
2473
|
+
if (!__classPrivateFieldGet(this, _CDPPage_disconnectPromise, "f")) {
|
2474
|
+
__classPrivateFieldSet(this, _CDPPage_disconnectPromise, new Promise(fulfill => {
|
2475
|
+
return __classPrivateFieldGet(this, _CDPPage_client, "f").once(Connection_js_1.CDPSessionEmittedEvents.Disconnected, () => {
|
2606
2476
|
return fulfill(new Error('Target closed'));
|
2607
2477
|
});
|
2608
2478
|
}), "f");
|
2609
2479
|
}
|
2610
|
-
return __classPrivateFieldGet(this,
|
2611
|
-
},
|
2612
|
-
const history = await __classPrivateFieldGet(this,
|
2480
|
+
return __classPrivateFieldGet(this, _CDPPage_disconnectPromise, "f");
|
2481
|
+
}, _CDPPage_go = async function _CDPPage_go(delta, options) {
|
2482
|
+
const history = await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Page.getNavigationHistory');
|
2613
2483
|
const entry = history.entries[history.currentIndex + delta];
|
2614
2484
|
if (!entry) {
|
2615
2485
|
return null;
|
2616
2486
|
}
|
2617
2487
|
const result = await Promise.all([
|
2618
2488
|
this.waitForNavigation(options),
|
2619
|
-
__classPrivateFieldGet(this,
|
2489
|
+
__classPrivateFieldGet(this, _CDPPage_client, "f").send('Page.navigateToHistoryEntry', { entryId: entry.id }),
|
2620
2490
|
]);
|
2621
2491
|
return result[0];
|
2622
|
-
},
|
2623
|
-
|
2624
|
-
|
2492
|
+
}, _CDPPage_screenshotTask = async function _CDPPage_screenshotTask(format, options = {}) {
|
2493
|
+
var _a, _b;
|
2494
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Target.activateTarget', {
|
2495
|
+
targetId: __classPrivateFieldGet(this, _CDPPage_target, "f")._targetId,
|
2625
2496
|
});
|
2626
2497
|
let clip = options.clip ? processClip(options.clip) : undefined;
|
2627
|
-
|
2628
|
-
|
2629
|
-
: true;
|
2630
|
-
const fromSurface = typeof options.fromSurface === 'boolean'
|
2631
|
-
? options.fromSurface
|
2632
|
-
: undefined;
|
2498
|
+
let captureBeyondViewport = (_a = options.captureBeyondViewport) !== null && _a !== void 0 ? _a : true;
|
2499
|
+
const fromSurface = options.fromSurface;
|
2633
2500
|
if (options.fullPage) {
|
2634
|
-
const metrics = await __classPrivateFieldGet(this,
|
2501
|
+
const metrics = await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Page.getLayoutMetrics');
|
2635
2502
|
// Fallback to `contentSize` in case of using Firefox.
|
2636
2503
|
const { width, height } = metrics.cssContentSize || metrics.contentSize;
|
2637
2504
|
// Overwrite clip for full page.
|
2638
|
-
clip =
|
2505
|
+
clip = undefined;
|
2639
2506
|
if (!captureBeyondViewport) {
|
2640
|
-
const { isMobile = false, deviceScaleFactor = 1, isLandscape = false, } = __classPrivateFieldGet(this,
|
2507
|
+
const { isMobile = false, deviceScaleFactor = 1, isLandscape = false, } = __classPrivateFieldGet(this, _CDPPage_viewport, "f") || {};
|
2641
2508
|
const screenOrientation = isLandscape
|
2642
2509
|
? { angle: 90, type: 'landscapePrimary' }
|
2643
2510
|
: { angle: 0, type: 'portraitPrimary' };
|
2644
|
-
await __classPrivateFieldGet(this,
|
2511
|
+
await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Emulation.setDeviceMetricsOverride', {
|
2645
2512
|
mobile: isMobile,
|
2646
2513
|
width,
|
2647
2514
|
height,
|
@@ -2650,22 +2517,28 @@ async function _Page_setTransparentBackgroundColor() {
|
|
2650
2517
|
});
|
2651
2518
|
}
|
2652
2519
|
}
|
2520
|
+
else if (!clip) {
|
2521
|
+
captureBeyondViewport = false;
|
2522
|
+
}
|
2653
2523
|
const shouldSetDefaultBackground = options.omitBackground && (format === 'png' || format === 'webp');
|
2654
2524
|
if (shouldSetDefaultBackground) {
|
2655
|
-
await __classPrivateFieldGet(this,
|
2525
|
+
await __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_setTransparentBackgroundColor).call(this);
|
2656
2526
|
}
|
2657
|
-
const result = await __classPrivateFieldGet(this,
|
2527
|
+
const result = await __classPrivateFieldGet(this, _CDPPage_client, "f").send('Page.captureScreenshot', {
|
2658
2528
|
format,
|
2659
2529
|
quality: options.quality,
|
2660
|
-
clip
|
2530
|
+
clip: clip && {
|
2531
|
+
...clip,
|
2532
|
+
scale: (_b = clip.scale) !== null && _b !== void 0 ? _b : 1,
|
2533
|
+
},
|
2661
2534
|
captureBeyondViewport,
|
2662
2535
|
fromSurface,
|
2663
2536
|
});
|
2664
2537
|
if (shouldSetDefaultBackground) {
|
2665
|
-
await __classPrivateFieldGet(this,
|
2538
|
+
await __classPrivateFieldGet(this, _CDPPage_instances, "m", _CDPPage_resetDefaultBackgroundColor).call(this);
|
2666
2539
|
}
|
2667
|
-
if (options.fullPage && __classPrivateFieldGet(this,
|
2668
|
-
await this.setViewport(__classPrivateFieldGet(this,
|
2540
|
+
if (options.fullPage && __classPrivateFieldGet(this, _CDPPage_viewport, "f")) {
|
2541
|
+
await this.setViewport(__classPrivateFieldGet(this, _CDPPage_viewport, "f"));
|
2669
2542
|
}
|
2670
2543
|
const buffer = options.encoding === 'base64'
|
2671
2544
|
? result.data
|
@@ -2688,7 +2561,7 @@ async function _Page_setTransparentBackgroundColor() {
|
|
2688
2561
|
const y = Math.round(clip.y);
|
2689
2562
|
const width = Math.round(clip.width + clip.x - x);
|
2690
2563
|
const height = Math.round(clip.height + clip.y - y);
|
2691
|
-
return { x, y, width, height, scale:
|
2564
|
+
return { x, y, width, height, scale: clip.scale };
|
2692
2565
|
}
|
2693
2566
|
};
|
2694
2567
|
const supportedMetrics = new Set([
|