chrome-devtools-frontend 1.0.1721762 → 1.0.1726686
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/.agents/skills/review-ui-widgets/SKILL.md +7 -7
- package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +12 -0
- package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +3 -3
- package/.agents/skills/ui-widgets/SKILL.md +2 -1
- package/docs/cookbook/dependencies.md +57 -11
- package/docs/get_the_code.md +15 -0
- package/front_end/core/i18n/collect-ui-strings.js +58 -12
- package/front_end/core/i18n/i18nImpl.ts +1 -1
- package/front_end/core/root/Runtime.ts +1 -1
- package/front_end/core/sdk/ResourceTreeModel.ts +16 -0
- package/front_end/core/sdk/WebAuthnModel.ts +17 -10
- package/front_end/entrypoints/js_app/js_app.ts +2 -5
- package/front_end/entrypoints/node_app/node_app.ts +2 -3
- package/front_end/generated/InspectorBackendCommands.ts +3 -3
- package/front_end/generated/protocol.ts +17 -0
- package/front_end/models/ai_assistance/skills/lighthouse.md +2 -1
- package/front_end/models/ai_assistance/skills/network.md +1 -0
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +26 -2
- package/front_end/models/ai_assistance/tools/GetLighthouseAudits.ts +1 -1
- package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +2 -7
- package/front_end/models/ai_assistance/tools/RunLighthouse.ts +2 -2
- package/front_end/models/comment_manager/CD4ABridge.ts +4 -0
- package/front_end/models/comment_manager/CommentManager.ts +0 -6
- package/front_end/models/comment_manager/CommentThread.ts +39 -19
- package/front_end/models/elements/StyleChanges.ts +66 -0
- package/front_end/models/trace/EventsSerializer.ts +2 -7
- package/front_end/models/trace/ModelImpl.ts +0 -2
- package/front_end/models/trace/handlers/FlowsHandler.ts +37 -29
- package/front_end/models/trace/handlers/NetworkRequestsHandler.ts +13 -6
- package/front_end/models/trace/helpers/SyntheticEvents.ts +10 -37
- package/front_end/models/trace/insights/RenderBlocking.ts +3 -1
- package/front_end/models/trace/lantern/simulation/Simulator.ts +4 -0
- package/front_end/models/trace/lantern/types/Lantern.ts +1 -0
- package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +92 -0
- package/front_end/panels/accessibility/SourceOrderView.ts +1 -1
- package/front_end/panels/accessibility/accessibilityAnnouncementRecordingListView.css +3 -1
- package/front_end/panels/accessibility/accessibilityAnnouncementRecordingView.css +12 -1
- package/front_end/panels/application/ApplicationPanelSidebar.ts +90 -0
- package/front_end/panels/application/StorageView.ts +348 -254
- package/front_end/panels/application/SubAppsView.ts +159 -0
- package/front_end/panels/application/application.ts +2 -0
- package/front_end/panels/application/preloading/PreloadingView.ts +360 -336
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +3 -3
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +6 -3
- package/front_end/panels/application/preloading/components/RuleSetGrid.ts +17 -17
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +2 -2
- package/front_end/panels/application/preloading/preloadingView.css +12 -4
- package/front_end/panels/application/preloading/preloadingViewDropDown.css +1 -1
- package/front_end/panels/application/storageView.css +16 -21
- package/front_end/panels/application/subAppsView.css +21 -0
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +2 -2
- package/front_end/panels/browser_debugger/browser_debugger-meta.ts +6 -8
- package/front_end/panels/comments/CommentsPane.ts +26 -9
- package/front_end/panels/comments/commentsPane.css +25 -6
- package/front_end/panels/common/CommentThreadWidget.ts +2 -2
- package/front_end/panels/common/CommentsOverlayWidget.ts +94 -35
- package/front_end/panels/common/commentThreadWidget.css +17 -0
- package/front_end/panels/common/commentsOverlay.css +5 -10
- package/front_end/panels/common/common-meta.ts +11 -1
- package/front_end/panels/elements/ClassesPaneWidget.ts +133 -89
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +7 -33
- package/front_end/panels/elements/DOMTreeElementWidget.ts +3 -1
- package/front_end/panels/elements/DOMTreeWidget.ts +19 -3
- package/front_end/panels/elements/ElementStatePaneWidget.ts +11 -1
- package/front_end/panels/elements/PropertyRenderer.ts +3 -2
- package/front_end/panels/elements/StyleEditorWidget.ts +87 -39
- package/front_end/panels/elements/StylePropertiesSection.ts +32 -5
- package/front_end/panels/elements/StylePropertyTreeElement.ts +227 -162
- package/front_end/panels/elements/StylesSidebarPane.ts +1 -0
- package/front_end/panels/event_listeners/EventListenersView.ts +11 -8
- package/front_end/panels/layer_viewer/Layers3DView.ts +21 -37
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterSettings.ts +1 -1
- package/front_end/panels/network/NetworkConfigView.ts +12 -10
- package/front_end/panels/network/NetworkDataGridNode.ts +3 -1
- package/front_end/panels/network/RequestConditionsDrawer.ts +1 -1
- package/front_end/panels/network/RequestPayloadView.ts +12 -5
- package/front_end/panels/network/networkConfigView.css +8 -8
- package/front_end/panels/profiler/HeapProfileView.ts +28 -6
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +7 -3
- package/front_end/panels/protocol_monitor/JSONEditor.ts +0 -1
- package/front_end/panels/recorder/RecorderPanel.ts +2 -2
- package/front_end/panels/screencast/ScreencastView.ts +3 -6
- package/front_end/panels/security/SecurityPanelSidebar.ts +0 -31
- package/front_end/panels/settings/SettingsScreen.ts +1 -1
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +9 -16
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +358 -345
- package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +136 -121
- package/front_end/panels/sources/NavigatorView.ts +105 -45
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +8 -5
- package/front_end/panels/sources/SourcesNavigator.ts +421 -213
- package/front_end/panels/sources/SourcesPanel.ts +9 -5
- package/front_end/panels/sources/TabbedEditorContainer.ts +41 -18
- package/front_end/panels/sources/UISourceCodeFrame.ts +1 -1
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +10 -5
- package/front_end/panels/sources/sources-meta.ts +4 -15
- package/front_end/panels/sources/sourcesNavigator.css +5 -0
- package/front_end/panels/timeline/ModificationsManager.ts +0 -2
- package/front_end/panels/timeline/README.md +2 -0
- package/front_end/panels/timeline/TimelineCommentContext.ts +171 -0
- package/front_end/panels/timeline/TimelineCommentController.ts +168 -30
- package/front_end/panels/timeline/TimelinePanel.ts +4 -0
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +1 -1
- package/front_end/panels/timeline/timeline.ts +2 -0
- package/front_end/panels/timeline/utils/Treemap.ts +8 -0
- package/front_end/panels/webauthn/WebauthnPane.ts +15 -13
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +113 -3
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +21311 -20981
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts +36 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.js +22 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js +20 -18
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.d.ts +20 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts +40 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.js +41 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.js +23 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Input.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js +13 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Request.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Request.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Request.js +18 -11
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Request.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Accessibility.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Accessibility.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Accessibility.js +8 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js +24 -12
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/EmulationManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/EmulationManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/EmulationManager.js +13 -7
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/EmulationManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.d.ts +22 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.js +75 -9
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.d.ts +18 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.js +8 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js +65 -26
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js +19 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.js +4 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.js +4 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/TargetManager.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/TargetManager.js +95 -8
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.d.ts +0 -8
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js +8 -24
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.js +5 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts +9 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/WaitTask.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/WaitTask.js +10 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/WaitTask.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.d.ts +10 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js +30 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/Poller.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/Poller.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/Poller.js +33 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/Poller.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/encoding.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/encoding.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +113 -3
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +42 -0
- package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +25 -22
- package/front_end/third_party/puppeteer/package/src/api/HTTPRequest.ts +22 -2
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +45 -2
- package/front_end/third_party/puppeteer/package/src/api/locators/locators.ts +79 -32
- package/front_end/third_party/puppeteer/package/src/bidi/HTTPRequest.ts +32 -12
- package/front_end/third_party/puppeteer/package/src/bidi/Input.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +18 -2
- package/front_end/third_party/puppeteer/package/src/bidi/core/Request.ts +21 -13
- package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +12 -2
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +37 -16
- package/front_end/third_party/puppeteer/package/src/cdp/EmulationManager.ts +14 -11
- package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +7 -1
- package/front_end/third_party/puppeteer/package/src/cdp/HTTPRequest.ts +101 -14
- package/front_end/third_party/puppeteer/package/src/cdp/NetworkEventManager.ts +26 -6
- package/front_end/third_party/puppeteer/package/src/cdp/NetworkManager.ts +111 -29
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +37 -1
- package/front_end/third_party/puppeteer/package/src/cdp/ScreenRecording.ts +5 -4
- package/front_end/third_party/puppeteer/package/src/cdp/Target.ts +5 -0
- package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +122 -7
- package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +13 -33
- package/front_end/third_party/puppeteer/package/src/common/BrowserWebSocketTransport.ts +10 -5
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +10 -0
- package/front_end/third_party/puppeteer/package/src/common/WaitTask.ts +12 -0
- package/front_end/third_party/puppeteer/package/src/common/util.ts +39 -5
- package/front_end/third_party/puppeteer/package/src/generated/injected.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/injected/Poller.ts +35 -3
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +4 -2
- package/front_end/third_party/puppeteer/package/src/node/NodeWebSocketTransport.ts +5 -0
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/encoding.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/comments/CommentAnchorResolver.ts +3 -0
- package/front_end/ui/comments/CommentOverlayManager.ts +2 -4
- package/front_end/ui/components/lists/List.ts +14 -1
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +1 -1
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +23 -14
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +3 -0
- package/front_end/ui/helpers/OpenInNewTab.ts +8 -0
- package/front_end/ui/legacy/LinkContextMenuProvider.ts +1 -1
- package/front_end/ui/legacy/ListWidget.ts +14 -18
- package/front_end/ui/legacy/TabbedPane.ts +46 -3
- package/front_end/ui/legacy/Toolbar.ts +0 -1
- package/front_end/ui/legacy/Treeoutline.ts +10 -3
- package/front_end/ui/legacy/UIUtils.ts +5 -2
- package/front_end/ui/legacy/components/inline_editor/Swatches.ts +19 -6
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +20 -11
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +27 -7
- package/front_end/ui/visual_logging/KnownContextValues.ts +5 -0
- package/package.json +1 -1
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* @internal
|
|
8
8
|
*/
|
|
9
9
|
export declare const PUPPETEER_REVISIONS: Readonly<{
|
|
10
|
-
chrome: "
|
|
11
|
-
'chrome-headless-shell': "
|
|
12
|
-
firefox: "stable_158.0";
|
|
10
|
+
chrome: "156.0.8078.47";
|
|
11
|
+
'chrome-headless-shell': "156.0.8078.47";
|
|
12
|
+
firefox: "stable_158.0.1";
|
|
13
13
|
}>;
|
|
14
14
|
//# sourceMappingURL=revisions.d.ts.map
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* @internal
|
|
8
8
|
*/
|
|
9
9
|
export const PUPPETEER_REVISIONS = Object.freeze({
|
|
10
|
-
chrome: '
|
|
11
|
-
'chrome-headless-shell': '
|
|
12
|
-
firefox: 'stable_158.0',
|
|
10
|
+
chrome: '156.0.8078.47',
|
|
11
|
+
'chrome-headless-shell': '156.0.8078.47',
|
|
12
|
+
firefox: 'stable_158.0.1',
|
|
13
13
|
});
|
|
14
14
|
//# sourceMappingURL=revisions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revisions.js","sourceRoot":"","sources":["../../src/revisions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC/C,MAAM,EAAE,eAAe;IACvB,uBAAuB,EAAE,eAAe;IACxC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"revisions.js","sourceRoot":"","sources":["../../src/revisions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC/C,MAAM,EAAE,eAAe;IACvB,uBAAuB,EAAE,eAAe;IACxC,OAAO,EAAE,gBAAgB;CAC1B,CAAC,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* @internal
|
|
8
8
|
*/
|
|
9
|
-
export declare function stringToTypedArray(string: string, base64Encoded?: boolean): Uint8Array
|
|
9
|
+
export declare function stringToTypedArray(string: string, base64Encoded?: boolean): Uint8Array<ArrayBuffer>;
|
|
10
10
|
/**
|
|
11
11
|
* @internal
|
|
12
12
|
*/
|
|
@@ -18,5 +18,5 @@ export declare function typedArrayToBase64(typedArray: Uint8Array): string;
|
|
|
18
18
|
/**
|
|
19
19
|
* @internal
|
|
20
20
|
*/
|
|
21
|
-
export declare function mergeUint8Arrays(items: Uint8Array[]): Uint8Array
|
|
21
|
+
export declare function mergeUint8Arrays(items: Uint8Array[]): Uint8Array<ArrayBuffer>;
|
|
22
22
|
//# sourceMappingURL=encoding.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encoding.d.ts","sourceRoot":"","sources":["../../../src/util/encoding.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,aAAa,UAAQ,GACpB,UAAU,
|
|
1
|
+
{"version":3,"file":"encoding.d.ts","sourceRoot":"","sources":["../../../src/util/encoding.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,aAAa,UAAQ,GACpB,UAAU,CAAC,WAAW,CAAC,CAezB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAElD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAajE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC,WAAW,CAAC,CAe7E"}
|
|
@@ -439,6 +439,24 @@ export declare abstract class Browser extends EventEmitter<BrowserEvents> {
|
|
|
439
439
|
* {@link Browser.defaultBrowserContext | default browser context}).
|
|
440
440
|
*/
|
|
441
441
|
abstract target(): Target;
|
|
442
|
+
/**
|
|
443
|
+
* Sets the network conditions (blocklist or allowlist) and re-applies the
|
|
444
|
+
* conditions to all targets.
|
|
445
|
+
* To clear all network conditions, omit the argument or pass `null`.
|
|
446
|
+
*
|
|
447
|
+
* @param conditions - The network conditions to apply.
|
|
448
|
+
*
|
|
449
|
+
* @remarks
|
|
450
|
+
* Currently only supported for Chrome and the CDP protocol.
|
|
451
|
+
*
|
|
452
|
+
* Targets that are already on a blocked URL when `restrictNetwork` is called
|
|
453
|
+
* will remain attached and stay on the blocked page. This is a behavior difference
|
|
454
|
+
* compared to launching the browser with network restrictions, where such targets
|
|
455
|
+
* are detached immediately upon initial attach.
|
|
456
|
+
*
|
|
457
|
+
* @experimental
|
|
458
|
+
*/
|
|
459
|
+
restrictNetwork(conditions?: NetworkRestrictions | null): Promise<void>;
|
|
442
460
|
/**
|
|
443
461
|
* Waits until a {@link Target | target} matching the given `predicate`
|
|
444
462
|
* appears and returns it.
|
|
@@ -4056,9 +4074,28 @@ export declare abstract class HTTPRequest {
|
|
|
4056
4074
|
* Fetches the POST data for the request from the browser.
|
|
4057
4075
|
*/
|
|
4058
4076
|
abstract fetchPostData(): Promise<string | undefined>;
|
|
4077
|
+
/**
|
|
4078
|
+
* Fetches the POST data for the request from the browser as a `Uint8Array`.
|
|
4079
|
+
*
|
|
4080
|
+
* @remarks
|
|
4081
|
+
* If the request has no POST data or fetching the POST data from the browser
|
|
4082
|
+
* fails, this method resolves to `undefined`.
|
|
4083
|
+
*
|
|
4084
|
+
* @returns A promise that resolves to the raw POST data bytes, or
|
|
4085
|
+
* `undefined` when the request has no POST data or fetching it fails.
|
|
4086
|
+
*/
|
|
4087
|
+
abstract content(): Promise<Uint8Array | undefined>;
|
|
4059
4088
|
/**
|
|
4060
4089
|
* An object with HTTP headers associated with the request. All
|
|
4061
4090
|
* header names are lower-case.
|
|
4091
|
+
*
|
|
4092
|
+
* @remarks
|
|
4093
|
+
*
|
|
4094
|
+
* Under CDP, `page.on('request')` fires before the browser's network stack
|
|
4095
|
+
* attaches all headers (such as `accept`, `accept-encoding`, `cookie`,
|
|
4096
|
+
* `host`, and `sec-fetch-*`). The full set of headers is populated
|
|
4097
|
+
* asynchronously and is available by the time `page.on('response')` or
|
|
4098
|
+
* `page.on('requestfinished')` fires.
|
|
4062
4099
|
*/
|
|
4063
4100
|
abstract headers(): Record<string, string>;
|
|
4064
4101
|
/**
|
|
@@ -4068,7 +4105,7 @@ export declare abstract class HTTPRequest {
|
|
|
4068
4105
|
*
|
|
4069
4106
|
* Headers are copied to the new Request instance. The request URL and
|
|
4070
4107
|
* method are preserved. The body is built from
|
|
4071
|
-
* {@link HTTPRequest.
|
|
4108
|
+
* {@link HTTPRequest.content} when the request has post data,
|
|
4072
4109
|
* otherwise the Request is created without a body. For `GET` and
|
|
4073
4110
|
* `HEAD` requests the body is always omitted, as required by the
|
|
4074
4111
|
* Fetch API.
|
|
@@ -5503,6 +5540,8 @@ export declare abstract class Locator<T> extends EventEmitter<LocatorEvents> {
|
|
|
5503
5540
|
* method is chosen based on the type. `contenteditable`, select, textarea and
|
|
5504
5541
|
* input elements are supported. For checkboxes, radio buttons and switches
|
|
5505
5542
|
* specify a boolean value.
|
|
5543
|
+
* Read-only elements and values the element does not accept are rejected without
|
|
5544
|
+
* modifying the element.
|
|
5506
5545
|
*/
|
|
5507
5546
|
fill<ElementType extends Element>(
|
|
5508
5547
|
this: Locator<ElementType>,
|
|
@@ -5992,6 +6031,25 @@ export declare interface NetworkConditions {
|
|
|
5992
6031
|
latency?: number;
|
|
5993
6032
|
}
|
|
5994
6033
|
|
|
6034
|
+
/**
|
|
6035
|
+
* @experimental
|
|
6036
|
+
* @public
|
|
6037
|
+
*/
|
|
6038
|
+
export declare interface NetworkRestrictions {
|
|
6039
|
+
/**
|
|
6040
|
+
* A list of {@link https://urlpattern.spec.whatwg.org/ | URLPattern} strings to block.
|
|
6041
|
+
* Mutually exclusive with {@link NetworkRestrictions.allowlist}.
|
|
6042
|
+
* Passing `[]` or omitting this option means no restriction.
|
|
6043
|
+
*/
|
|
6044
|
+
blocklist?: string[];
|
|
6045
|
+
/**
|
|
6046
|
+
* A list of {@link https://urlpattern.spec.whatwg.org/ | URLPattern} strings to allow.
|
|
6047
|
+
* Mutually exclusive with {@link NetworkRestrictions.blocklist}.
|
|
6048
|
+
* Passing `[]` or omitting this option means no restriction.
|
|
6049
|
+
*/
|
|
6050
|
+
allowlist?: string[];
|
|
6051
|
+
}
|
|
6052
|
+
|
|
5995
6053
|
/**
|
|
5996
6054
|
* @public
|
|
5997
6055
|
*/
|
|
@@ -6129,13 +6187,17 @@ export declare abstract class Page extends EventEmitter<PageEvents> {
|
|
|
6129
6187
|
* Consider using {@link BrowserContext.overridePermissions} to grant
|
|
6130
6188
|
* permissions for the page to read its geolocation.
|
|
6131
6189
|
*
|
|
6190
|
+
* Pass `null` to remove the geolocation override.
|
|
6191
|
+
*
|
|
6132
6192
|
* @example
|
|
6133
6193
|
*
|
|
6134
6194
|
* ```ts
|
|
6135
6195
|
* await page.setGeolocation({latitude: 59.95, longitude: 30.31667});
|
|
6196
|
+
* // Later, go back to the browser's real geolocation:
|
|
6197
|
+
* await page.setGeolocation(null);
|
|
6136
6198
|
* ```
|
|
6137
6199
|
*/
|
|
6138
|
-
abstract setGeolocation(options: GeolocationOptions): Promise<void>;
|
|
6200
|
+
abstract setGeolocation(options: GeolocationOptions | null): Promise<void>;
|
|
6139
6201
|
/**
|
|
6140
6202
|
* A target this page was created from.
|
|
6141
6203
|
*
|
|
@@ -7983,6 +8045,17 @@ export declare abstract class Page extends EventEmitter<PageEvents> {
|
|
|
7983
8045
|
* @experimental
|
|
7984
8046
|
*/
|
|
7985
8047
|
abstract windowId(): Promise<WindowId>;
|
|
8048
|
+
/**
|
|
8049
|
+
* Returns information about the browser tab of this page. The result is a
|
|
8050
|
+
* snapshot and is not updated when the tab changes.
|
|
8051
|
+
*
|
|
8052
|
+
* @returns `null` if the page is not in a tab strip, for example, in
|
|
8053
|
+
* `chrome-headless-shell`. Chrome before M150 does not report tab
|
|
8054
|
+
* information, so the method also returns `null` there.
|
|
8055
|
+
*
|
|
8056
|
+
* @experimental
|
|
8057
|
+
*/
|
|
8058
|
+
abstract tabInfo(): Promise<TabInfo | null>;
|
|
7986
8059
|
[disposeSymbol](): void;
|
|
7987
8060
|
[asyncDisposeSymbol](): Promise<void>;
|
|
7988
8061
|
/**
|
|
@@ -8624,6 +8697,7 @@ declare namespace Puppeteer_2 {
|
|
|
8624
8697
|
LaunchPWAOptions,
|
|
8625
8698
|
GetPWAStateOptions,
|
|
8626
8699
|
PWAState,
|
|
8700
|
+
NetworkRestrictions,
|
|
8627
8701
|
BrowserContextEvents,
|
|
8628
8702
|
CDPEvents,
|
|
8629
8703
|
CDPSessionEvents,
|
|
@@ -8679,6 +8753,7 @@ declare namespace Puppeteer_2 {
|
|
|
8679
8753
|
NewDocumentScriptEvaluation,
|
|
8680
8754
|
ReloadOptions,
|
|
8681
8755
|
HeapSnapshotOptions,
|
|
8756
|
+
TabInfo,
|
|
8682
8757
|
WritableDestination,
|
|
8683
8758
|
WebWorkerEvents,
|
|
8684
8759
|
VisibilityOption,
|
|
@@ -9625,7 +9700,8 @@ export declare interface SerializedAXNode {
|
|
|
9625
9700
|
* Get an ElementHandle for this AXNode if available.
|
|
9626
9701
|
*
|
|
9627
9702
|
* If the underlying DOM element has been disposed, the method might return an
|
|
9628
|
-
* error.
|
|
9703
|
+
* error. If the frame has navigated to a new document since the snapshot,
|
|
9704
|
+
* the method returns `null`.
|
|
9629
9705
|
*/
|
|
9630
9706
|
elementHandle(): Promise<ElementHandle | null>;
|
|
9631
9707
|
}
|
|
@@ -9700,6 +9776,31 @@ export declare type SupportedWebDriverCapability = Exclude<
|
|
|
9700
9776
|
'unhandledPromptBehavior' | 'acceptInsecureCerts'
|
|
9701
9777
|
>;
|
|
9702
9778
|
|
|
9779
|
+
/**
|
|
9780
|
+
* Information about the browser tab of a page. See {@link Page.tabInfo}.
|
|
9781
|
+
*
|
|
9782
|
+
* @public
|
|
9783
|
+
* @experimental
|
|
9784
|
+
*/
|
|
9785
|
+
export declare interface TabInfo {
|
|
9786
|
+
/**
|
|
9787
|
+
* Zero-based index of the tab in its window's tab strip.
|
|
9788
|
+
*/
|
|
9789
|
+
index: number;
|
|
9790
|
+
/**
|
|
9791
|
+
* Whether the tab is the active tab in its window.
|
|
9792
|
+
*/
|
|
9793
|
+
active: boolean;
|
|
9794
|
+
/**
|
|
9795
|
+
* Whether the tab is pinned.
|
|
9796
|
+
*/
|
|
9797
|
+
pinned: boolean;
|
|
9798
|
+
/**
|
|
9799
|
+
* ID of the tab group the tab belongs to, if any.
|
|
9800
|
+
*/
|
|
9801
|
+
groupId?: string;
|
|
9802
|
+
}
|
|
9803
|
+
|
|
9703
9804
|
/**
|
|
9704
9805
|
* Target represents a
|
|
9705
9806
|
* {@link https://chromedevtools.github.io/devtools-protocol/tot/Target/ | CDP target}.
|
|
@@ -10481,6 +10582,15 @@ export declare interface WsOptions {
|
|
|
10481
10582
|
* @defaultValue `256 * 1024 * 1024`
|
|
10482
10583
|
*/
|
|
10483
10584
|
maxPayload?: number;
|
|
10585
|
+
/**
|
|
10586
|
+
* Time in milliseconds to wait for the WebSocket opening handshake before
|
|
10587
|
+
* failing. Without it, connecting to a host that accepts the TCP connection
|
|
10588
|
+
* but never answers the upgrade request waits until the operating system
|
|
10589
|
+
* gives up. Node.js only.
|
|
10590
|
+
*
|
|
10591
|
+
* @defaultValue no timeout
|
|
10592
|
+
*/
|
|
10593
|
+
handshakeTimeout?: number;
|
|
10484
10594
|
}
|
|
10485
10595
|
|
|
10486
10596
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "puppeteer-core",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.16.0",
|
|
4
4
|
"description": "A high-level API to control headless Chrome over the DevTools Protocol",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"puppeteer",
|
|
@@ -148,15 +148,15 @@
|
|
|
148
148
|
"author": "The Chromium Authors",
|
|
149
149
|
"license": "Apache-2.0",
|
|
150
150
|
"dependencies": {
|
|
151
|
-
"@puppeteer/browsers": "3.2.
|
|
151
|
+
"@puppeteer/browsers": "3.2.6",
|
|
152
152
|
"chromium-bidi": "157.0.8090-0",
|
|
153
|
-
"devtools-protocol": "0.0.
|
|
153
|
+
"devtools-protocol": "0.0.1704951",
|
|
154
154
|
"typed-query-selector": "^2.12.3",
|
|
155
155
|
"webdriver-bidi-protocol": "1.0.1",
|
|
156
156
|
"ws": "^8.22.0"
|
|
157
157
|
},
|
|
158
158
|
"devDependencies": {
|
|
159
|
-
"@types/chrome": "0.3.
|
|
159
|
+
"@types/chrome": "0.3.5",
|
|
160
160
|
"@types/node": "^18.17.15",
|
|
161
161
|
"@types/ws": "8.18.2",
|
|
162
162
|
"mitt": "3.0.1",
|
|
@@ -22,6 +22,7 @@ import type {
|
|
|
22
22
|
} from '../common/Cookie.js';
|
|
23
23
|
import {DEBUG_PREFIXES, type Logger} from '../common/Debug.js';
|
|
24
24
|
import type {DownloadBehavior} from '../common/DownloadBehavior.js';
|
|
25
|
+
import {UnsupportedOperation} from '../common/Errors.js';
|
|
25
26
|
import {EventEmitter, type EventType} from '../common/EventEmitter.js';
|
|
26
27
|
import {
|
|
27
28
|
fromEmitterEvent,
|
|
@@ -436,6 +437,25 @@ export interface PWAState {
|
|
|
436
437
|
fileHandlers: Protocol.PWA.FileHandler[];
|
|
437
438
|
}
|
|
438
439
|
|
|
440
|
+
/**
|
|
441
|
+
* @experimental
|
|
442
|
+
* @public
|
|
443
|
+
*/
|
|
444
|
+
export interface NetworkRestrictions {
|
|
445
|
+
/**
|
|
446
|
+
* A list of {@link https://urlpattern.spec.whatwg.org/ | URLPattern} strings to block.
|
|
447
|
+
* Mutually exclusive with {@link NetworkRestrictions.allowlist}.
|
|
448
|
+
* Passing `[]` or omitting this option means no restriction.
|
|
449
|
+
*/
|
|
450
|
+
blocklist?: string[];
|
|
451
|
+
/**
|
|
452
|
+
* A list of {@link https://urlpattern.spec.whatwg.org/ | URLPattern} strings to allow.
|
|
453
|
+
* Mutually exclusive with {@link NetworkRestrictions.blocklist}.
|
|
454
|
+
* Passing `[]` or omitting this option means no restriction.
|
|
455
|
+
*/
|
|
456
|
+
allowlist?: string[];
|
|
457
|
+
}
|
|
458
|
+
|
|
439
459
|
/**
|
|
440
460
|
* {@link Browser} represents a browser instance that is either:
|
|
441
461
|
*
|
|
@@ -590,6 +610,28 @@ export abstract class Browser extends EventEmitter<BrowserEvents> {
|
|
|
590
610
|
*/
|
|
591
611
|
abstract target(): Target;
|
|
592
612
|
|
|
613
|
+
/**
|
|
614
|
+
* Sets the network conditions (blocklist or allowlist) and re-applies the
|
|
615
|
+
* conditions to all targets.
|
|
616
|
+
* To clear all network conditions, omit the argument or pass `null`.
|
|
617
|
+
*
|
|
618
|
+
* @param conditions - The network conditions to apply.
|
|
619
|
+
*
|
|
620
|
+
* @remarks
|
|
621
|
+
* Currently only supported for Chrome and the CDP protocol.
|
|
622
|
+
*
|
|
623
|
+
* Targets that are already on a blocked URL when `restrictNetwork` is called
|
|
624
|
+
* will remain attached and stay on the blocked page. This is a behavior difference
|
|
625
|
+
* compared to launching the browser with network restrictions, where such targets
|
|
626
|
+
* are detached immediately upon initial attach.
|
|
627
|
+
*
|
|
628
|
+
* @experimental
|
|
629
|
+
*/
|
|
630
|
+
restrictNetwork(conditions?: NetworkRestrictions | null): Promise<void> {
|
|
631
|
+
void conditions;
|
|
632
|
+
throw new UnsupportedOperation();
|
|
633
|
+
}
|
|
634
|
+
|
|
593
635
|
/**
|
|
594
636
|
* Waits until a {@link Target | target} matching the given `predicate`
|
|
595
637
|
* appears and returns it.
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
import type {
|
|
14
14
|
Cookie,
|
|
15
15
|
CookieData,
|
|
16
|
+
CookiePartitionKey,
|
|
16
17
|
DeleteCookiesRequest,
|
|
17
18
|
} from '../common/Cookie.js';
|
|
18
19
|
import {DEBUG_PREFIXES, type Logger} from '../common/Debug.js';
|
|
@@ -319,40 +320,42 @@ export abstract class BrowserContext extends EventEmitter<BrowserContextEvents>
|
|
|
319
320
|
const cookiesToDelete = cookies.filter(cookie => {
|
|
320
321
|
return filters.some(filter => {
|
|
321
322
|
if (filter.name === cookie.name) {
|
|
322
|
-
if (filter.domain !== undefined && filter.domain
|
|
323
|
-
return
|
|
323
|
+
if (filter.domain !== undefined && filter.domain !== cookie.domain) {
|
|
324
|
+
return false;
|
|
324
325
|
}
|
|
325
326
|
|
|
326
|
-
if (filter.path !== undefined && filter.path
|
|
327
|
-
return
|
|
327
|
+
if (filter.path !== undefined && filter.path !== cookie.path) {
|
|
328
|
+
return false;
|
|
328
329
|
}
|
|
329
|
-
if (
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
330
|
+
if (filter.partitionKey !== undefined) {
|
|
331
|
+
if (cookie.partitionKey === undefined) {
|
|
332
|
+
return false;
|
|
333
|
+
}
|
|
333
334
|
if (typeof cookie.partitionKey !== 'object') {
|
|
334
335
|
throw new Error('Unexpected string partition key');
|
|
335
336
|
}
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
337
|
+
const filterKey: CookiePartitionKey =
|
|
338
|
+
typeof filter.partitionKey === 'string'
|
|
339
|
+
? {sourceOrigin: filter.partitionKey}
|
|
340
|
+
: filter.partitionKey;
|
|
341
|
+
if (filterKey.sourceOrigin !== cookie.partitionKey.sourceOrigin) {
|
|
342
|
+
return false;
|
|
343
|
+
}
|
|
344
|
+
if (
|
|
345
|
+
filterKey.hasCrossSiteAncestor !== undefined &&
|
|
346
|
+
filterKey.hasCrossSiteAncestor !==
|
|
347
|
+
cookie.partitionKey.hasCrossSiteAncestor
|
|
348
|
+
) {
|
|
349
|
+
return false;
|
|
347
350
|
}
|
|
348
351
|
}
|
|
349
352
|
if (filter.url !== undefined) {
|
|
350
353
|
const url = new URL(filter.url);
|
|
351
354
|
if (
|
|
352
|
-
url.hostname
|
|
353
|
-
url.pathname
|
|
355
|
+
url.hostname !== cookie.domain ||
|
|
356
|
+
url.pathname !== cookie.path
|
|
354
357
|
) {
|
|
355
|
-
return
|
|
358
|
+
return false;
|
|
356
359
|
}
|
|
357
360
|
}
|
|
358
361
|
return true;
|
|
@@ -382,9 +382,29 @@ export abstract class HTTPRequest {
|
|
|
382
382
|
*/
|
|
383
383
|
abstract fetchPostData(): Promise<string | undefined>;
|
|
384
384
|
|
|
385
|
+
/**
|
|
386
|
+
* Fetches the POST data for the request from the browser as a `Uint8Array`.
|
|
387
|
+
*
|
|
388
|
+
* @remarks
|
|
389
|
+
* If the request has no POST data or fetching the POST data from the browser
|
|
390
|
+
* fails, this method resolves to `undefined`.
|
|
391
|
+
*
|
|
392
|
+
* @returns A promise that resolves to the raw POST data bytes, or
|
|
393
|
+
* `undefined` when the request has no POST data or fetching it fails.
|
|
394
|
+
*/
|
|
395
|
+
abstract content(): Promise<Uint8Array | undefined>;
|
|
396
|
+
|
|
385
397
|
/**
|
|
386
398
|
* An object with HTTP headers associated with the request. All
|
|
387
399
|
* header names are lower-case.
|
|
400
|
+
*
|
|
401
|
+
* @remarks
|
|
402
|
+
*
|
|
403
|
+
* Under CDP, `page.on('request')` fires before the browser's network stack
|
|
404
|
+
* attaches all headers (such as `accept`, `accept-encoding`, `cookie`,
|
|
405
|
+
* `host`, and `sec-fetch-*`). The full set of headers is populated
|
|
406
|
+
* asynchronously and is available by the time `page.on('response')` or
|
|
407
|
+
* `page.on('requestfinished')` fires.
|
|
388
408
|
*/
|
|
389
409
|
abstract headers(): Record<string, string>;
|
|
390
410
|
|
|
@@ -395,7 +415,7 @@ export abstract class HTTPRequest {
|
|
|
395
415
|
*
|
|
396
416
|
* Headers are copied to the new Request instance. The request URL and
|
|
397
417
|
* method are preserved. The body is built from
|
|
398
|
-
* {@link HTTPRequest.
|
|
418
|
+
* {@link HTTPRequest.content} when the request has post data,
|
|
399
419
|
* otherwise the Request is created without a body. For `GET` and
|
|
400
420
|
* `HEAD` requests the body is always omitted, as required by the
|
|
401
421
|
* Fetch API.
|
|
@@ -408,7 +428,7 @@ export abstract class HTTPRequest {
|
|
|
408
428
|
|
|
409
429
|
let body: BodyInit | null = null;
|
|
410
430
|
if (method !== 'GET' && method !== 'HEAD' && this.hasPostData()) {
|
|
411
|
-
body = ((await this.
|
|
431
|
+
body = ((await this.content()) as unknown as BodyInit) ?? null;
|
|
412
432
|
}
|
|
413
433
|
|
|
414
434
|
return new Request(this.url(), {
|
|
@@ -752,6 +752,31 @@ export interface HeapSnapshotOptions {
|
|
|
752
752
|
path: string;
|
|
753
753
|
}
|
|
754
754
|
|
|
755
|
+
/**
|
|
756
|
+
* Information about the browser tab of a page. See {@link Page.tabInfo}.
|
|
757
|
+
*
|
|
758
|
+
* @public
|
|
759
|
+
* @experimental
|
|
760
|
+
*/
|
|
761
|
+
export interface TabInfo {
|
|
762
|
+
/**
|
|
763
|
+
* Zero-based index of the tab in its window's tab strip.
|
|
764
|
+
*/
|
|
765
|
+
index: number;
|
|
766
|
+
/**
|
|
767
|
+
* Whether the tab is the active tab in its window.
|
|
768
|
+
*/
|
|
769
|
+
active: boolean;
|
|
770
|
+
/**
|
|
771
|
+
* Whether the tab is pinned.
|
|
772
|
+
*/
|
|
773
|
+
pinned: boolean;
|
|
774
|
+
/**
|
|
775
|
+
* ID of the tab group the tab belongs to, if any.
|
|
776
|
+
*/
|
|
777
|
+
groupId?: string;
|
|
778
|
+
}
|
|
779
|
+
|
|
755
780
|
/**
|
|
756
781
|
* Page provides methods to interact with a single tab or
|
|
757
782
|
* {@link https://developer.chrome.com/extensions/background_pages | extension background page}
|
|
@@ -986,13 +1011,17 @@ export abstract class Page extends EventEmitter<PageEvents> {
|
|
|
986
1011
|
* Consider using {@link BrowserContext.overridePermissions} to grant
|
|
987
1012
|
* permissions for the page to read its geolocation.
|
|
988
1013
|
*
|
|
1014
|
+
* Pass `null` to remove the geolocation override.
|
|
1015
|
+
*
|
|
989
1016
|
* @example
|
|
990
1017
|
*
|
|
991
1018
|
* ```ts
|
|
992
1019
|
* await page.setGeolocation({latitude: 59.95, longitude: 30.31667});
|
|
1020
|
+
* // Later, go back to the browser's real geolocation:
|
|
1021
|
+
* await page.setGeolocation(null);
|
|
993
1022
|
* ```
|
|
994
1023
|
*/
|
|
995
|
-
abstract setGeolocation(options: GeolocationOptions): Promise<void>;
|
|
1024
|
+
abstract setGeolocation(options: GeolocationOptions | null): Promise<void>;
|
|
996
1025
|
|
|
997
1026
|
/**
|
|
998
1027
|
* A target this page was created from.
|
|
@@ -2780,7 +2809,9 @@ export abstract class Page extends EventEmitter<PageEvents> {
|
|
|
2780
2809
|
try {
|
|
2781
2810
|
await recording._start();
|
|
2782
2811
|
} catch (error) {
|
|
2783
|
-
|
|
2812
|
+
// Clean up the recording. Ignore errors from stop() so the original
|
|
2813
|
+
// error from _start() is the one that propagates.
|
|
2814
|
+
await recording.stop().catch(() => {});
|
|
2784
2815
|
throw error;
|
|
2785
2816
|
}
|
|
2786
2817
|
|
|
@@ -3459,6 +3490,18 @@ export abstract class Page extends EventEmitter<PageEvents> {
|
|
|
3459
3490
|
*/
|
|
3460
3491
|
abstract windowId(): Promise<WindowId>;
|
|
3461
3492
|
|
|
3493
|
+
/**
|
|
3494
|
+
* Returns information about the browser tab of this page. The result is a
|
|
3495
|
+
* snapshot and is not updated when the tab changes.
|
|
3496
|
+
*
|
|
3497
|
+
* @returns `null` if the page is not in a tab strip, for example, in
|
|
3498
|
+
* `chrome-headless-shell`. Chrome before M150 does not report tab
|
|
3499
|
+
* information, so the method also returns `null` there.
|
|
3500
|
+
*
|
|
3501
|
+
* @experimental
|
|
3502
|
+
*/
|
|
3503
|
+
abstract tabInfo(): Promise<TabInfo | null>;
|
|
3504
|
+
|
|
3462
3505
|
override [disposeSymbol](): void {
|
|
3463
3506
|
return void this[asyncDisposeSymbol]().catch(error => {
|
|
3464
3507
|
this.logger?.(DEBUG_PREFIXES.error)?.(error);
|