chrome-devtools-frontend 1.0.950484 → 1.0.951410
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/config/gni/devtools_grd_files.gni +3 -4
- package/docs/triage_guidelines.md +2 -2
- package/front_end/core/dom_extension/DOMExtension.ts +1 -1
- package/front_end/core/host/InspectorFrontendHostAPI.ts +0 -1
- package/front_end/core/host/UserMetrics.ts +0 -14
- package/front_end/core/i18n/locales/en-US.json +183 -183
- package/front_end/core/i18n/locales/en-XL.json +183 -183
- package/front_end/core/platform/platform.ts +1 -2
- package/front_end/core/platform/typescript-utilities.ts +4 -0
- package/front_end/core/sdk/CSSRule.ts +1 -1
- package/front_end/core/sdk/DOMModel.ts +12 -37
- package/front_end/core/sdk/OverlayModel.ts +18 -34
- package/front_end/core/sdk/RuntimeModel.ts +0 -1
- package/front_end/core/sdk/SourceMap.ts +1 -1
- package/front_end/devtools_compatibility.js +0 -1
- package/front_end/entrypoints/device_mode_emulation_frame/device_mode_emulation_frame.ts +2 -7
- package/front_end/entrypoints/heap_snapshot_worker/AllocationProfile.ts +3 -3
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +1 -2
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +1 -1
- package/front_end/entrypoints/main/MainImpl.ts +1 -3
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +1 -2
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +1 -1
- package/front_end/models/bindings/FileUtils.ts +0 -1
- package/front_end/models/bindings/IgnoreListManager.ts +1 -2
- package/front_end/models/bindings/NetworkProject.ts +1 -2
- package/front_end/models/extensions/ExtensionAPI.ts +0 -1
- package/front_end/models/issues_manager/SameSiteCookieIssue.ts +1 -2
- package/front_end/models/timeline_model/TracingLayerTree.ts +0 -1
- package/front_end/panels/accessibility/ARIAMetadata.ts +0 -1
- package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +2 -2
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +1 -2
- package/front_end/panels/animation/AnimationTimeline.ts +0 -1
- package/front_end/panels/application/ApplicationPanelCacheSection.ts +3 -4
- package/front_end/panels/application/ServiceWorkerUpdateCycleView.ts +0 -2
- package/front_end/panels/application/StorageView.ts +2 -6
- package/front_end/panels/application/{BackForwardCacheStrings.ts → components/BackForwardCacheStrings.ts} +2 -2
- package/front_end/panels/application/{BackForwardCacheView.ts → components/BackForwardCacheView.ts} +76 -42
- package/front_end/panels/application/{backForwardCacheView.css → components/backForwardCacheView.css} +9 -0
- package/front_end/panels/application/components/components.ts +2 -0
- package/front_end/panels/elements/ComputedStyleModel.ts +2 -2
- package/front_end/panels/elements/ElementsPanel.ts +1 -5
- package/front_end/panels/elements/ElementsTreeOutline.ts +2 -2
- package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
- package/front_end/panels/layer_viewer/Layers3DView.ts +3 -9
- package/front_end/panels/lighthouse/LighthouseController.ts +4 -5
- package/front_end/panels/media/TickingFlameChart.ts +1 -2
- package/front_end/panels/network/NetworkLogViewColumns.ts +1 -1
- package/front_end/panels/profiler/HeapProfileView.ts +1 -1
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +0 -1
- package/front_end/panels/profiler/HeapSnapshotView.ts +1 -2
- package/front_end/panels/profiler/heapProfiler.css +1 -1
- package/front_end/panels/security/SecurityModel.ts +2 -4
- package/front_end/panels/security/SecurityPanel.ts +2 -2
- package/front_end/panels/settings/settingsScreen.css +8 -3
- package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +2 -2
- package/front_end/panels/sources/NavigatorView.ts +1 -1
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +2 -3
- package/front_end/panels/sources/TabbedEditorContainer.ts +1 -1
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +2 -5
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +0 -1
- package/front_end/panels/timeline/TimelineFlameChartView.ts +0 -1
- package/front_end/panels/timeline/TimelinePanel.ts +2 -3
- package/front_end/panels/timeline/TimelineUIUtils.ts +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +15 -0
- package/front_end/third_party/codemirror.next/package.json +3 -3
- package/front_end/third_party/puppeteer/package/README.md +11 -11
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api-docs-entry.d.ts +4 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.js +2 -2
- 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 +4 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.d.ts +1 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.d.ts +1 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.d.ts +9 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js +21 -12
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Dialog.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EvalTypes.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.d.ts +3 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FileChooser.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts +8 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js +3 -3
- 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/HTTPRequest.d.ts +50 -11
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js +70 -33
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.d.ts +12 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.js +25 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.d.ts +2 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts +39 -6
- 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 +36 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.d.ts +3 -4
- 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 +2 -1
- 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 +46 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.js +124 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts +27 -10
- 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 +144 -74
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.d.ts +5 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.d.ts +4 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.d.ts +3 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.d.ts +4 -5
- 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 +43 -17
- 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/LaunchOptions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.js +101 -34
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/NodeWebSocketTransport.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PipeTransport.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.d.ts +5 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api-docs-entry.d.ts +4 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js +2 -2
- 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 +4 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js +2 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +3 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts +1 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts +1 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts +9 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js +24 -17
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EvalTypes.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts +3 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts +8 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js +7 -8
- 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/HTTPRequest.d.ts +50 -11
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js +70 -34
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts +12 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.js +26 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts +2 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts +39 -6
- 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 +38 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts +3 -4
- 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 +4 -4
- 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 +46 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.js +120 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts +27 -10
- 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 +144 -75
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js +12 -14
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts +5 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.js +3 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts +4 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts +3 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js +3 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.js +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js +10 -12
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts +4 -5
- 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 +43 -20
- 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/LaunchOptions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js +104 -40
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts +5 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/install.js +3 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node-puppeteer-core.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/web.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +173 -36
- package/front_end/third_party/puppeteer/package/package.json +3 -3
- package/front_end/ui/components/markdown_view/MarkdownView.ts +0 -1
- package/front_end/ui/components/report_view/report.css +0 -1
- package/front_end/ui/components/text_editor/config.ts +7 -4
- package/front_end/ui/legacy/ContextMenu.ts +2 -3
- package/front_end/ui/legacy/InspectorView.ts +1 -1
- package/front_end/ui/legacy/ReportView.ts +3 -4
- package/front_end/ui/legacy/SearchableView.ts +1 -2
- package/front_end/ui/legacy/SplitWidget.ts +2 -3
- package/front_end/ui/legacy/TextPrompt.ts +1 -1
- package/front_end/ui/legacy/UIUtils.ts +1 -1
- package/front_end/ui/legacy/XLink.ts +1 -1
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +2 -2
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +3 -3
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +7 -7
- package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +1 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +1 -2
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +0 -1
- package/front_end/ui/legacy/components/utils/Linkifier.ts +2 -2
- package/front_end/ui/legacy/theme_support/theme_support_impl.ts +12 -1
- package/inspector_overlay/main.ts +16 -2
- package/package.json +1 -1
- package/scripts/build/ninja/copy.gni +2 -2
- package/front_end/core/platform/utilities.ts +0 -49
|
@@ -13,9 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { isNode } from './environment.js';
|
|
17
16
|
import { initializePuppeteerWeb } from './initialize-web.js';
|
|
18
|
-
|
|
17
|
+
import { isNode } from './environment.js';
|
|
19
18
|
if (isNode) {
|
|
20
19
|
throw new Error('Trying to run Puppeteer-Web in a Node environment');
|
|
21
20
|
}
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* These global declarations exist so puppeteer can work without the need to use `"dom"`
|
|
3
|
-
* types.
|
|
4
|
-
*
|
|
5
|
-
* To get full type information for these interfaces, add `"types": "dom"`in your
|
|
6
|
-
* `tsconfig.json` file.
|
|
7
|
-
*/
|
|
8
|
-
declare global {
|
|
9
|
-
interface Document {
|
|
10
|
-
}
|
|
11
|
-
interface Element {
|
|
12
|
-
}
|
|
13
|
-
interface NodeListOf<TNode> {
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=global.d.ts.map
|
|
18
1
|
/// <reference types="node" />
|
|
19
2
|
|
|
20
3
|
import { ChildProcess } from 'child_process';
|
|
@@ -725,7 +708,7 @@ export declare interface BrowserLaunchArgumentOptions {
|
|
|
725
708
|
userDataDir?: string;
|
|
726
709
|
/**
|
|
727
710
|
* Whether to auto-open a DevTools panel for each tab. If this is set to
|
|
728
|
-
* `true`, then `headless` will be
|
|
711
|
+
* `true`, then `headless` will be forced to `false`.
|
|
729
712
|
* @defaultValue `false`
|
|
730
713
|
*/
|
|
731
714
|
devtools?: boolean;
|
|
@@ -797,6 +780,18 @@ export declare class CDPSession extends EventEmitter {
|
|
|
797
780
|
id(): string;
|
|
798
781
|
}
|
|
799
782
|
|
|
783
|
+
declare interface CDPSession_2 extends EventEmitter {
|
|
784
|
+
send<T extends keyof ProtocolMapping.Commands>(method: T, ...paramArgs: ProtocolMapping.Commands[T]['paramsType']): Promise<ProtocolMapping.Commands[T]['returnType']>;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
declare interface CDPSession_3 extends EventEmitter {
|
|
788
|
+
send<T extends keyof ProtocolMapping.Commands>(method: T, ...paramArgs: ProtocolMapping.Commands[T]['paramsType']): Promise<ProtocolMapping.Commands[T]['returnType']>;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
declare interface CDPSession_4 extends EventEmitter {
|
|
792
|
+
send<T extends keyof ProtocolMapping.Commands>(method: T, ...paramArgs: ProtocolMapping.Commands[T]['paramsType']): Promise<ProtocolMapping.Commands[T]['returnType']>;
|
|
793
|
+
}
|
|
794
|
+
|
|
800
795
|
/**
|
|
801
796
|
* Internal events that the CDPSession class emits.
|
|
802
797
|
*
|
|
@@ -1250,6 +1245,13 @@ export declare interface CustomQueryHandler {
|
|
|
1250
1245
|
*/
|
|
1251
1246
|
export declare function customQueryHandlerNames(): string[];
|
|
1252
1247
|
|
|
1248
|
+
/**
|
|
1249
|
+
* The default cooperative request interception resolution priority
|
|
1250
|
+
*
|
|
1251
|
+
* @public
|
|
1252
|
+
*/
|
|
1253
|
+
export declare const DEFAULT_INTERCEPT_RESOLUTION_PRIORITY = 0;
|
|
1254
|
+
|
|
1253
1255
|
/**
|
|
1254
1256
|
* Copyright 2017 Google Inc. All rights reserved.
|
|
1255
1257
|
*
|
|
@@ -1502,6 +1504,41 @@ export declare class ElementHandle<ElementType extends Element = Element> extend
|
|
|
1502
1504
|
* @internal
|
|
1503
1505
|
*/
|
|
1504
1506
|
constructor(context: ExecutionContext, client: CDPSession, remoteObject: Protocol.Runtime.RemoteObject, page: Page, frameManager: FrameManager);
|
|
1507
|
+
/**
|
|
1508
|
+
* Wait for the `selector` to appear within the element. If at the moment of calling the
|
|
1509
|
+
* method the `selector` already exists, the method will return immediately. If
|
|
1510
|
+
* the `selector` doesn't appear after the `timeout` milliseconds of waiting, the
|
|
1511
|
+
* function will throw.
|
|
1512
|
+
*
|
|
1513
|
+
* This method does not work across navigations or if the element is detached from DOM.
|
|
1514
|
+
*
|
|
1515
|
+
* @param selector - A
|
|
1516
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors | selector}
|
|
1517
|
+
* of an element to wait for
|
|
1518
|
+
* @param options - Optional waiting parameters
|
|
1519
|
+
* @returns Promise which resolves when element specified by selector string
|
|
1520
|
+
* is added to DOM. Resolves to `null` if waiting for hidden: `true` and
|
|
1521
|
+
* selector is not found in DOM.
|
|
1522
|
+
* @remarks
|
|
1523
|
+
* The optional parameters in `options` are:
|
|
1524
|
+
*
|
|
1525
|
+
* - `visible`: wait for the selected element to be present in DOM and to be
|
|
1526
|
+
* visible, i.e. to not have `display: none` or `visibility: hidden` CSS
|
|
1527
|
+
* properties. Defaults to `false`.
|
|
1528
|
+
*
|
|
1529
|
+
* - `hidden`: wait for the selected element to not be found in the DOM or to be hidden,
|
|
1530
|
+
* i.e. have `display: none` or `visibility: hidden` CSS properties. Defaults to
|
|
1531
|
+
* `false`.
|
|
1532
|
+
*
|
|
1533
|
+
* - `timeout`: maximum time to wait in milliseconds. Defaults to `30000`
|
|
1534
|
+
* (30 seconds). Pass `0` to disable timeout. The default value can be changed
|
|
1535
|
+
* by using the {@link Page.setDefaultTimeout} method.
|
|
1536
|
+
*/
|
|
1537
|
+
waitForSelector(selector: string, options?: {
|
|
1538
|
+
visible?: boolean;
|
|
1539
|
+
hidden?: boolean;
|
|
1540
|
+
timeout?: number;
|
|
1541
|
+
}): Promise<ElementHandle | null>;
|
|
1505
1542
|
asElement(): ElementHandle<ElementType> | null;
|
|
1506
1543
|
/**
|
|
1507
1544
|
* Resolves to the content frame for element handles referencing
|
|
@@ -1991,6 +2028,8 @@ export declare class ExecutionContext {
|
|
|
1991
2028
|
_adoptElementHandle(elementHandle: ElementHandle): Promise<ElementHandle>;
|
|
1992
2029
|
}
|
|
1993
2030
|
|
|
2031
|
+
declare type FetchRequestId = string;
|
|
2032
|
+
|
|
1994
2033
|
/**
|
|
1995
2034
|
* File choosers let you react to the page requesting for a file.
|
|
1996
2035
|
* @remarks
|
|
@@ -2714,6 +2753,10 @@ export declare class FrameManager extends EventEmitter {
|
|
|
2714
2753
|
private _removeFramesRecursively;
|
|
2715
2754
|
}
|
|
2716
2755
|
|
|
2756
|
+
declare interface FrameManager_2 {
|
|
2757
|
+
frame(frameId: string): Frame | null;
|
|
2758
|
+
}
|
|
2759
|
+
|
|
2717
2760
|
/**
|
|
2718
2761
|
* We use symbols to prevent external parties listening to these events.
|
|
2719
2762
|
* They are internal to Puppeteer.
|
|
@@ -2856,14 +2899,13 @@ export declare class HTTPRequest {
|
|
|
2856
2899
|
private _continueRequestOverrides;
|
|
2857
2900
|
private _responseForRequest;
|
|
2858
2901
|
private _abortErrorReason;
|
|
2859
|
-
private
|
|
2860
|
-
private
|
|
2861
|
-
private _interceptActions;
|
|
2902
|
+
private _interceptResolutionState;
|
|
2903
|
+
private _interceptHandlers;
|
|
2862
2904
|
private _initiator;
|
|
2863
2905
|
/**
|
|
2864
2906
|
* @internal
|
|
2865
2907
|
*/
|
|
2866
|
-
constructor(client:
|
|
2908
|
+
constructor(client: CDPSession_4, frame: Frame, interceptionId: string, allowInterception: boolean, event: Protocol.Network.RequestWillBeSentEvent, redirectChain: HTTPRequest[]);
|
|
2867
2909
|
/**
|
|
2868
2910
|
* @returns the URL of the request
|
|
2869
2911
|
*/
|
|
@@ -2884,11 +2926,22 @@ export declare class HTTPRequest {
|
|
|
2884
2926
|
*/
|
|
2885
2927
|
abortErrorReason(): Protocol.Network.ErrorReason;
|
|
2886
2928
|
/**
|
|
2887
|
-
* @returns An
|
|
2888
|
-
*
|
|
2929
|
+
* @returns An InterceptResolutionState object describing the current resolution
|
|
2930
|
+
* action and priority.
|
|
2931
|
+
*
|
|
2932
|
+
* InterceptResolutionState contains:
|
|
2933
|
+
* action: InterceptResolutionAction
|
|
2934
|
+
* priority?: number
|
|
2935
|
+
*
|
|
2936
|
+
* InterceptResolutionAction is one of: `abort`, `respond`, `continue`,
|
|
2889
2937
|
* `disabled`, `none`, or `already-handled`.
|
|
2890
2938
|
*/
|
|
2891
|
-
|
|
2939
|
+
interceptResolutionState(): InterceptResolutionState;
|
|
2940
|
+
/**
|
|
2941
|
+
* @returns `true` if the intercept resolution has already been handled,
|
|
2942
|
+
* `false` otherwise.
|
|
2943
|
+
*/
|
|
2944
|
+
isInterceptResolutionHandled(): boolean;
|
|
2892
2945
|
/**
|
|
2893
2946
|
* Adds an async request handler to the processing queue.
|
|
2894
2947
|
* Deferred handlers are not guaranteed to execute in any particular order,
|
|
@@ -3091,7 +3144,11 @@ export declare class HTTPResponse {
|
|
|
3091
3144
|
/**
|
|
3092
3145
|
* @internal
|
|
3093
3146
|
*/
|
|
3094
|
-
constructor(client:
|
|
3147
|
+
constructor(client: CDPSession_3, request: HTTPRequest, responsePayload: Protocol.Network.Response, extraInfo: Protocol.Network.ResponseReceivedExtraInfoEvent | null);
|
|
3148
|
+
/**
|
|
3149
|
+
* @internal
|
|
3150
|
+
*/
|
|
3151
|
+
_parseStatusTextFromExtrInfo(extraInfo: Protocol.Network.ResponseReceivedExtraInfoEvent | null): string | undefined;
|
|
3095
3152
|
/**
|
|
3096
3153
|
* @internal
|
|
3097
3154
|
*/
|
|
@@ -3169,7 +3226,29 @@ export declare class HTTPResponse {
|
|
|
3169
3226
|
/**
|
|
3170
3227
|
* @public
|
|
3171
3228
|
*/
|
|
3172
|
-
export declare
|
|
3229
|
+
export declare enum InterceptResolutionAction {
|
|
3230
|
+
Abort = "abort",
|
|
3231
|
+
Respond = "respond",
|
|
3232
|
+
Continue = "continue",
|
|
3233
|
+
Disabled = "disabled",
|
|
3234
|
+
None = "none",
|
|
3235
|
+
AlreadyHandled = "already-handled"
|
|
3236
|
+
}
|
|
3237
|
+
|
|
3238
|
+
/**
|
|
3239
|
+
* @public
|
|
3240
|
+
*/
|
|
3241
|
+
export declare interface InterceptResolutionState {
|
|
3242
|
+
action: InterceptResolutionAction;
|
|
3243
|
+
priority?: number;
|
|
3244
|
+
}
|
|
3245
|
+
|
|
3246
|
+
/**
|
|
3247
|
+
* @public
|
|
3248
|
+
*
|
|
3249
|
+
* @deprecated please use {@link InterceptResolutionAction} instead.
|
|
3250
|
+
*/
|
|
3251
|
+
export declare type InterceptResolutionStrategy = InterceptResolutionAction;
|
|
3173
3252
|
|
|
3174
3253
|
/**
|
|
3175
3254
|
* @public
|
|
@@ -3676,7 +3755,7 @@ export declare class HTTPResponse {
|
|
|
3676
3755
|
constructor(frameManager: FrameManager, frame: Frame, waitUntil: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[], timeout: number);
|
|
3677
3756
|
_onRequest(request: HTTPRequest): void;
|
|
3678
3757
|
_onFrameDetached(frame: Frame): void;
|
|
3679
|
-
navigationResponse(): HTTPResponse | null
|
|
3758
|
+
navigationResponse(): Promise<HTTPResponse | null>;
|
|
3680
3759
|
_terminate(error: Error): void;
|
|
3681
3760
|
sameDocumentNavigationPromise(): Promise<Error | null>;
|
|
3682
3761
|
newDocumentNavigationPromise(): Promise<Error | null>;
|
|
@@ -3903,16 +3982,45 @@ export declare class HTTPResponse {
|
|
|
3903
3982
|
*/
|
|
3904
3983
|
export declare let networkConditions: PredefinedNetworkConditions;
|
|
3905
3984
|
|
|
3985
|
+
/**
|
|
3986
|
+
* @internal
|
|
3987
|
+
*
|
|
3988
|
+
* Helper class to track network events by request ID
|
|
3989
|
+
*/
|
|
3990
|
+
declare class NetworkEventManager {
|
|
3991
|
+
private _requestWillBeSentMap;
|
|
3992
|
+
private _requestPausedMap;
|
|
3993
|
+
private _httpRequestsMap;
|
|
3994
|
+
private _responseReceivedExtraInfoMap;
|
|
3995
|
+
private _queuedRedirectInfoMap;
|
|
3996
|
+
private _queuedEventGroupMap;
|
|
3997
|
+
forget(networkRequestId: NetworkRequestId): void;
|
|
3998
|
+
responseExtraInfo(networkRequestId: NetworkRequestId): Protocol.Network.ResponseReceivedExtraInfoEvent[];
|
|
3999
|
+
private queuedRedirectInfo;
|
|
4000
|
+
queueRedirectInfo(fetchRequestId: FetchRequestId, redirectInfo: RedirectInfo): void;
|
|
4001
|
+
takeQueuedRedirectInfo(fetchRequestId: FetchRequestId): RedirectInfo | undefined;
|
|
4002
|
+
numRequestsInProgress(): number;
|
|
4003
|
+
storeRequestWillBeSent(networkRequestId: NetworkRequestId, event: Protocol.Network.RequestWillBeSentEvent): void;
|
|
4004
|
+
getRequestWillBeSent(networkRequestId: NetworkRequestId): Protocol.Network.RequestWillBeSentEvent | undefined;
|
|
4005
|
+
forgetRequestWillBeSent(networkRequestId: NetworkRequestId): void;
|
|
4006
|
+
getRequestPaused(networkRequestId: NetworkRequestId): Protocol.Fetch.RequestPausedEvent | undefined;
|
|
4007
|
+
forgetRequestPaused(networkRequestId: NetworkRequestId): void;
|
|
4008
|
+
storeRequestPaused(networkRequestId: NetworkRequestId, event: Protocol.Fetch.RequestPausedEvent): void;
|
|
4009
|
+
getRequest(networkRequestId: NetworkRequestId): HTTPRequest | undefined;
|
|
4010
|
+
storeRequest(networkRequestId: NetworkRequestId, request: HTTPRequest): void;
|
|
4011
|
+
forgetRequest(networkRequestId: NetworkRequestId): void;
|
|
4012
|
+
getQueuedEventGroup(networkRequestId: NetworkRequestId): QueuedEventGroup | undefined;
|
|
4013
|
+
queueEventGroup(networkRequestId: NetworkRequestId, event: QueuedEventGroup): void;
|
|
4014
|
+
}
|
|
4015
|
+
|
|
3906
4016
|
/**
|
|
3907
4017
|
* @internal
|
|
3908
4018
|
*/
|
|
3909
4019
|
export declare class NetworkManager extends EventEmitter {
|
|
3910
|
-
_client:
|
|
4020
|
+
_client: CDPSession_2;
|
|
3911
4021
|
_ignoreHTTPSErrors: boolean;
|
|
3912
|
-
_frameManager:
|
|
3913
|
-
|
|
3914
|
-
_requestIdToRequestPausedEvent: Map<string, Protocol.Fetch.RequestPausedEvent>;
|
|
3915
|
-
_requestIdToRequest: Map<string, HTTPRequest>;
|
|
4022
|
+
_frameManager: FrameManager_2;
|
|
4023
|
+
_networkEventManager: NetworkEventManager;
|
|
3916
4024
|
_extraHTTPHeaders: Record<string, string>;
|
|
3917
4025
|
_credentials?: Credentials;
|
|
3918
4026
|
_attemptedAuthentications: Set<string>;
|
|
@@ -3920,7 +4028,7 @@ export declare class HTTPResponse {
|
|
|
3920
4028
|
_protocolRequestInterceptionEnabled: boolean;
|
|
3921
4029
|
_userCacheDisabled: boolean;
|
|
3922
4030
|
_emulatedNetworkConditions: InternalNetworkConditions;
|
|
3923
|
-
constructor(client:
|
|
4031
|
+
constructor(client: CDPSession_2, ignoreHTTPSErrors: boolean, frameManager: FrameManager_2);
|
|
3924
4032
|
initialize(): Promise<void>;
|
|
3925
4033
|
authenticate(credentials?: Credentials): Promise<void>;
|
|
3926
4034
|
setExtraHTTPHeaders(extraHTTPHeaders: Record<string, string>): Promise<void>;
|
|
@@ -3937,14 +4045,27 @@ export declare class HTTPResponse {
|
|
|
3937
4045
|
_updateProtocolCacheDisabled(): Promise<void>;
|
|
3938
4046
|
_onRequestWillBeSent(event: Protocol.Network.RequestWillBeSentEvent): void;
|
|
3939
4047
|
_onAuthRequired(event: Protocol.Fetch.AuthRequiredEvent): void;
|
|
4048
|
+
/**
|
|
4049
|
+
* CDP may send a Fetch.requestPaused without or before a
|
|
4050
|
+
* Network.requestWillBeSent
|
|
4051
|
+
*
|
|
4052
|
+
* CDP may send multiple Fetch.requestPaused
|
|
4053
|
+
* for the same Network.requestWillBeSent.
|
|
4054
|
+
*
|
|
4055
|
+
*
|
|
4056
|
+
*/
|
|
3940
4057
|
_onRequestPaused(event: Protocol.Fetch.RequestPausedEvent): void;
|
|
3941
|
-
_onRequest(event: Protocol.Network.RequestWillBeSentEvent,
|
|
4058
|
+
_onRequest(event: Protocol.Network.RequestWillBeSentEvent, fetchRequestId?: FetchRequestId): void;
|
|
3942
4059
|
_onRequestServedFromCache(event: Protocol.Network.RequestServedFromCacheEvent): void;
|
|
3943
|
-
_handleRequestRedirect(request: HTTPRequest, responsePayload: Protocol.Network.Response): void;
|
|
4060
|
+
_handleRequestRedirect(request: HTTPRequest, responsePayload: Protocol.Network.Response, extraInfo: Protocol.Network.ResponseReceivedExtraInfoEvent): void;
|
|
4061
|
+
_emitResponseEvent(responseReceived: Protocol.Network.ResponseReceivedEvent, extraInfo: Protocol.Network.ResponseReceivedExtraInfoEvent | null): void;
|
|
3944
4062
|
_onResponseReceived(event: Protocol.Network.ResponseReceivedEvent): void;
|
|
4063
|
+
_onResponseReceivedExtraInfo(event: Protocol.Network.ResponseReceivedExtraInfoEvent): void;
|
|
3945
4064
|
_forgetRequest(request: HTTPRequest, events: boolean): void;
|
|
3946
4065
|
_onLoadingFinished(event: Protocol.Network.LoadingFinishedEvent): void;
|
|
4066
|
+
_emitLoadingFinished(event: Protocol.Network.LoadingFinishedEvent): void;
|
|
3947
4067
|
_onLoadingFailed(event: Protocol.Network.LoadingFailedEvent): void;
|
|
4068
|
+
_emitLoadingFailed(event: Protocol.Network.LoadingFailedEvent): void;
|
|
3948
4069
|
}
|
|
3949
4070
|
|
|
3950
4071
|
/**
|
|
@@ -3961,6 +4082,8 @@ export declare class HTTPResponse {
|
|
|
3961
4082
|
readonly RequestFinished: symbol;
|
|
3962
4083
|
};
|
|
3963
4084
|
|
|
4085
|
+
declare type NetworkRequestId = string;
|
|
4086
|
+
|
|
3964
4087
|
/**
|
|
3965
4088
|
* @public
|
|
3966
4089
|
*/
|
|
@@ -6415,6 +6538,17 @@ export declare class HTTPResponse {
|
|
|
6415
6538
|
*/
|
|
6416
6539
|
export declare type PuppeteerNodeLaunchOptions = BrowserLaunchArgumentOptions & LaunchOptions & BrowserConnectOptions;
|
|
6417
6540
|
|
|
6541
|
+
declare type QueuedEventGroup = {
|
|
6542
|
+
responseReceivedEvent: Protocol.Network.ResponseReceivedEvent;
|
|
6543
|
+
loadingFinishedEvent?: Protocol.Network.LoadingFinishedEvent;
|
|
6544
|
+
loadingFailedEvent?: Protocol.Network.LoadingFailedEvent;
|
|
6545
|
+
};
|
|
6546
|
+
|
|
6547
|
+
declare type RedirectInfo = {
|
|
6548
|
+
event: Protocol.Network.RequestWillBeSentEvent;
|
|
6549
|
+
fetchRequestId?: FetchRequestId;
|
|
6550
|
+
};
|
|
6551
|
+
|
|
6418
6552
|
/**
|
|
6419
6553
|
* @public
|
|
6420
6554
|
* {@inheritDoc Puppeteer.registerCustomQueryHandler}
|
|
@@ -6954,6 +7088,7 @@ export declare class HTTPResponse {
|
|
|
6954
7088
|
visible?: boolean;
|
|
6955
7089
|
hidden?: boolean;
|
|
6956
7090
|
timeout?: number;
|
|
7091
|
+
root?: ElementHandle;
|
|
6957
7092
|
}
|
|
6958
7093
|
|
|
6959
7094
|
/**
|
|
@@ -6983,6 +7118,7 @@ export declare class HTTPResponse {
|
|
|
6983
7118
|
_reject: (x: Error) => void;
|
|
6984
7119
|
_timeoutTimer?: NodeJS.Timeout;
|
|
6985
7120
|
_terminated: boolean;
|
|
7121
|
+
_root: ElementHandle;
|
|
6986
7122
|
constructor(options: WaitTaskOptions);
|
|
6987
7123
|
terminate(error: Error): void;
|
|
6988
7124
|
rerun(): Promise<void>;
|
|
@@ -7000,6 +7136,7 @@ export declare class HTTPResponse {
|
|
|
7000
7136
|
timeout: number;
|
|
7001
7137
|
binding?: PageBinding;
|
|
7002
7138
|
args: SerializableOrJSHandle[];
|
|
7139
|
+
root?: ElementHandle;
|
|
7003
7140
|
}
|
|
7004
7141
|
|
|
7005
7142
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "puppeteer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.0.0",
|
|
4
4
|
"description": "A high-level API to control headless Chrome over the DevTools Protocol",
|
|
5
5
|
"main": "./cjs-entry.js",
|
|
6
6
|
"types": "lib/types.d.ts",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"apply-next-version": "node utils/apply_next_version.js",
|
|
37
37
|
"test-install": "scripts/test-install.sh",
|
|
38
38
|
"clean-docs": "rimraf website/docs && rimraf docs-api-json",
|
|
39
|
-
"generate-d-ts": "npm run clean-docs && api-extractor run --local --verbose
|
|
39
|
+
"generate-d-ts": "npm run clean-docs && api-extractor run --local --verbose",
|
|
40
40
|
"generate-docs": "npm run generate-d-ts && api-documenter markdown -i docs-api-json -o website/docs && node utils/remove-tag.js",
|
|
41
41
|
"ensure-correct-devtools-protocol-revision": "ts-node -s scripts/ensure-correct-devtools-protocol-package",
|
|
42
42
|
"ensure-pinned-deps": "ts-node -s scripts/ensure-pinned-deps",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"license": "Apache-2.0",
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"debug": "4.3.2",
|
|
62
|
-
"devtools-protocol": "0.0.
|
|
62
|
+
"devtools-protocol": "0.0.937139",
|
|
63
63
|
"extract-zip": "2.0.1",
|
|
64
64
|
"https-proxy-agent": "5.0.0",
|
|
65
65
|
"node-fetch": "2.6.5",
|
|
@@ -69,7 +69,6 @@ const renderChildTokens = (token: any): string => {
|
|
|
69
69
|
const unescape = (text: string): string => {
|
|
70
70
|
// Unescape will get rid of the escaping done by Marked to avoid double escaping due to escaping it also with Lit-html
|
|
71
71
|
// Table taken from: front_end/third_party/marked/package/src/helpers.js
|
|
72
|
-
/** @type {Map<string,string>} */
|
|
73
72
|
const escapeReplacements = new Map<string, string>([
|
|
74
73
|
['&', '&'],
|
|
75
74
|
['<', '<'],
|
|
@@ -70,10 +70,13 @@ export const tabMovesFocus = DynamicSetting.bool('textEditorTabMovesFocus', [],
|
|
|
70
70
|
shift: (view: CM.EditorView): boolean => view.state.doc.length ? CM.indentLess(view) : false,
|
|
71
71
|
}]));
|
|
72
72
|
|
|
73
|
-
export const autocompletion =
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
export const autocompletion: CM.Extension = [
|
|
74
|
+
CM.autocompletion({
|
|
75
|
+
icons: false,
|
|
76
|
+
optionClass: (option: CM.Completion): string => option.type === 'secondary' ? 'cm-secondaryCompletion' : '',
|
|
77
|
+
}),
|
|
78
|
+
CM.Prec.highest(CM.keymap.of([{key: 'ArrowRight', run: CM.acceptCompletion}])),
|
|
79
|
+
];
|
|
77
80
|
|
|
78
81
|
export const sourcesAutocompletion = DynamicSetting.bool('textEditorAutocompletion', autocompletion);
|
|
79
82
|
|
|
@@ -472,9 +472,8 @@ export class ContextMenu extends SubMenu {
|
|
|
472
472
|
}
|
|
473
473
|
|
|
474
474
|
private buildMenuDescriptors(): (SoftContextMenuDescriptor|Host.InspectorFrontendHostAPI.ContextMenuDescriptor)[] {
|
|
475
|
-
return
|
|
476
|
-
.
|
|
477
|
-
.subItems as (SoftContextMenuDescriptor | Host.InspectorFrontendHostAPI.ContextMenuDescriptor)[];
|
|
475
|
+
return super.buildDescriptor().subItems as (
|
|
476
|
+
SoftContextMenuDescriptor | Host.InspectorFrontendHostAPI.ContextMenuDescriptor)[];
|
|
478
477
|
}
|
|
479
478
|
|
|
480
479
|
private onItemSelected(event: Common.EventTarget.EventTargetEvent<number>): void {
|
|
@@ -259,7 +259,7 @@ export class InspectorView extends VBox implements ViewLocationResolver {
|
|
|
259
259
|
if (!view) {
|
|
260
260
|
throw new Error(`Expected view for panel '${panelName}'`);
|
|
261
261
|
}
|
|
262
|
-
return
|
|
262
|
+
return view.widget() as Promise<Panel>;
|
|
263
263
|
}
|
|
264
264
|
|
|
265
265
|
onSuspendStateChanged(allTargetsSuspended: boolean): void {
|
|
@@ -155,7 +155,7 @@ export class Section extends VBox {
|
|
|
155
155
|
if (textValue && row.lastElementChild) {
|
|
156
156
|
row.lastElementChild.textContent = textValue;
|
|
157
157
|
}
|
|
158
|
-
return
|
|
158
|
+
return row.lastElementChild as HTMLElement;
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
appendFlexedField(title: string, textValue?: string): Element {
|
|
@@ -185,12 +185,11 @@ export class Section extends VBox {
|
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
appendRow(): HTMLElement {
|
|
188
|
-
return
|
|
188
|
+
return this.fieldList.createChild('div', 'report-row') as HTMLElement;
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
appendSelectableRow(): HTMLElement {
|
|
192
|
-
return
|
|
193
|
-
HTMLElement;
|
|
192
|
+
return this.fieldList.createChild('div', 'report-row report-row-selectable') as HTMLElement;
|
|
194
193
|
}
|
|
195
194
|
|
|
196
195
|
clearContent(): void {
|
|
@@ -130,8 +130,7 @@ export class SearchableView extends VBox {
|
|
|
130
130
|
|
|
131
131
|
this.searchProvider = searchable;
|
|
132
132
|
this.replaceProvider = replaceable;
|
|
133
|
-
this.setting =
|
|
134
|
-
settingName ? Common.Settings.Settings.instance().createSetting(settingName, /** @type {*} */ ({})) : null;
|
|
133
|
+
this.setting = settingName ? Common.Settings.Settings.instance().createSetting(settingName, {}) : null;
|
|
135
134
|
this.replaceable = false;
|
|
136
135
|
|
|
137
136
|
this.contentElement.createChild('slot');
|
|
@@ -100,8 +100,7 @@ export class SplitWidget extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
100
100
|
this.defaultSidebarHeight = defaultSidebarHeight || this.defaultSidebarWidth;
|
|
101
101
|
this.constraintsInDip = Boolean(constraintsInDip);
|
|
102
102
|
this.resizeStartSizeDIP = 0;
|
|
103
|
-
this.setting =
|
|
104
|
-
settingName ? Common.Settings.Settings.instance().createSetting(settingName, /** @type {*} */ ({})) : null;
|
|
103
|
+
this.setting = settingName ? Common.Settings.Settings.instance().createSetting(settingName, {}) : null;
|
|
105
104
|
|
|
106
105
|
this.totalSizeCSS = 0;
|
|
107
106
|
this.totalSizeOtherDimensionCSS = 0;
|
|
@@ -223,7 +222,7 @@ export class SplitWidget extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
223
222
|
}
|
|
224
223
|
|
|
225
224
|
sidebarElement(): HTMLElement {
|
|
226
|
-
return
|
|
225
|
+
return this.sidebarElementInternal;
|
|
227
226
|
}
|
|
228
227
|
|
|
229
228
|
childWasDetached(widget: Widget): void {
|
|
@@ -167,7 +167,7 @@ export class TextPrompt extends Common.ObjectWrapper.ObjectWrapper<EventTypes> i
|
|
|
167
167
|
if (!this.elementInternal) {
|
|
168
168
|
throw new Error('Expected an already attached element!');
|
|
169
169
|
}
|
|
170
|
-
return
|
|
170
|
+
return this.elementInternal as HTMLElement;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
detach(): void {
|
|
@@ -1117,7 +1117,7 @@ export function createInput(className?: string, type?: string): HTMLInputElement
|
|
|
1117
1117
|
if (type) {
|
|
1118
1118
|
element.type = type;
|
|
1119
1119
|
}
|
|
1120
|
-
return
|
|
1120
|
+
return element;
|
|
1121
1121
|
}
|
|
1122
1122
|
|
|
1123
1123
|
export function createSelect(name: string, options: string[]|Map<string, string[]>[]|Set<string>): HTMLSelectElement {
|
|
@@ -30,7 +30,7 @@ export class XLink extends XElement {
|
|
|
30
30
|
<x-link href='${url}' tabindex="0" class='${className} devtools-link' ${preventClick ? 'no-click' : ''}
|
|
31
31
|
>${Platform.StringUtilities.trimMiddle(linkText, MaxLengthForDisplayedURLs)}</x-link>`;
|
|
32
32
|
// clang-format on
|
|
33
|
-
return
|
|
33
|
+
return element as HTMLElement;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
constructor() {
|
|
@@ -347,7 +347,7 @@ export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof
|
|
|
347
347
|
case 'ArrowUp':
|
|
348
348
|
return elementPosition.right + 1;
|
|
349
349
|
default:
|
|
350
|
-
return
|
|
350
|
+
return (event as MouseEvent).x;
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
|
|
@@ -1089,7 +1089,7 @@ export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof
|
|
|
1089
1089
|
/**
|
|
1090
1090
|
* If the pasted input is parsable as a color, applies it converting to the current user format
|
|
1091
1091
|
*/
|
|
1092
|
-
private pasted(
|
|
1092
|
+
private pasted(event: ClipboardEvent): void {
|
|
1093
1093
|
if (!event.clipboardData) {
|
|
1094
1094
|
return;
|
|
1095
1095
|
}
|
|
@@ -1258,7 +1258,7 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
1258
1258
|
return;
|
|
1259
1259
|
}
|
|
1260
1260
|
|
|
1261
|
-
if (
|
|
1261
|
+
if ((event as MouseEvent).metaKey) {
|
|
1262
1262
|
if (gridNode.selected) {
|
|
1263
1263
|
gridNode.deselect();
|
|
1264
1264
|
} else {
|
|
@@ -1378,13 +1378,13 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
1378
1378
|
}
|
|
1379
1379
|
|
|
1380
1380
|
if (gridNode.expanded) {
|
|
1381
|
-
if (
|
|
1381
|
+
if ((event as MouseEvent).altKey) {
|
|
1382
1382
|
gridNode.collapseRecursively();
|
|
1383
1383
|
} else {
|
|
1384
1384
|
gridNode.collapse();
|
|
1385
1385
|
}
|
|
1386
1386
|
} else {
|
|
1387
|
-
if (
|
|
1387
|
+
if ((event as MouseEvent).altKey) {
|
|
1388
1388
|
gridNode.expandRecursively();
|
|
1389
1389
|
} else {
|
|
1390
1390
|
gridNode.expand();
|
|
@@ -226,16 +226,16 @@
|
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
.data-grid table.data tr.revealed.selected.dirty {
|
|
229
|
-
color: var(--
|
|
229
|
+
color: var(--color-selected-option);
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
.data-grid.no-selection:focus-visible {
|
|
233
|
-
border: 1px solid var(--
|
|
233
|
+
border: 1px solid var(--color-primary) !important; /* stylelint-disable-line declaration-no-important */
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
.data-grid:focus table.data tr.selected {
|
|
237
|
-
background-color: var(--
|
|
238
|
-
color: var(--
|
|
237
|
+
background-color: var(--color-selected-option-background);
|
|
238
|
+
color: var(--color-selected-option);
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
.data-grid:focus tr.selected.dirty {
|
|
@@ -249,16 +249,16 @@
|
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
.data-grid:focus tr.selected .devtools-link {
|
|
252
|
-
color: var(--
|
|
252
|
+
color: var(--color-selected-option);
|
|
253
253
|
}
|
|
254
254
|
|
|
255
255
|
.data-grid:focus tr.parent.selected td.disclosure::before {
|
|
256
|
-
background-color: var(--
|
|
256
|
+
background-color: var(--color-selected-option);
|
|
257
257
|
-webkit-mask-position: 0 0;
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
.data-grid:focus tr.expanded.selected td.disclosure::before {
|
|
261
|
-
background-color: var(--
|
|
261
|
+
background-color: var(--color-selected-option);
|
|
262
262
|
-webkit-mask-position: -16px 0;
|
|
263
263
|
}
|
|
264
264
|
|
|
@@ -116,7 +116,7 @@ export class CSSShadowEditor extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
116
116
|
const slider = UI.UIUtils.createSlider(0, maxRange, -1);
|
|
117
117
|
slider.addEventListener('input', this.onSliderInput.bind(this), false);
|
|
118
118
|
field.appendChild(slider);
|
|
119
|
-
return
|
|
119
|
+
return slider as HTMLInputElement;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
wasShown(): void {
|
|
@@ -896,7 +896,7 @@ export class FlameChart extends Common.ObjectWrapper.eventMixin<EventTypes, type
|
|
|
896
896
|
continue;
|
|
897
897
|
}
|
|
898
898
|
if (pos.x <= x && x < pos.x + pos.width) {
|
|
899
|
-
return
|
|
899
|
+
return index as number;
|
|
900
900
|
}
|
|
901
901
|
}
|
|
902
902
|
|
|
@@ -2204,7 +2204,6 @@ export class FlameChart extends Common.ObjectWrapper.eventMixin<EventTypes, type
|
|
|
2204
2204
|
this.highlightedMarkerIndex = -1;
|
|
2205
2205
|
this.highlightedEntryIndex = -1;
|
|
2206
2206
|
this.selectedEntryIndex = -1;
|
|
2207
|
-
/** @type {!Map<string,!Map<string,number>>} */
|
|
2208
2207
|
this.textWidth = new Map();
|
|
2209
2208
|
this.chartViewport.scheduleUpdate();
|
|
2210
2209
|
}
|