chrome-devtools-frontend 1.0.973645 → 1.0.975056
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 -0
- package/config/gni/devtools_image_files.gni +2 -0
- package/front_end/Images/src/triangle-collapsed.svg +1 -0
- package/front_end/Images/src/triangle-expanded.svg +1 -0
- package/front_end/core/common/ParsedURL.ts +9 -9
- package/front_end/core/i18n/locales/af.json +74 -29
- package/front_end/core/i18n/locales/am.json +74 -29
- package/front_end/core/i18n/locales/ar.json +74 -29
- package/front_end/core/i18n/locales/as.json +74 -29
- package/front_end/core/i18n/locales/az.json +74 -29
- package/front_end/core/i18n/locales/be.json +74 -29
- package/front_end/core/i18n/locales/bg.json +74 -29
- package/front_end/core/i18n/locales/bn.json +74 -29
- package/front_end/core/i18n/locales/bs.json +75 -30
- package/front_end/core/i18n/locales/ca.json +74 -29
- package/front_end/core/i18n/locales/cs.json +74 -29
- package/front_end/core/i18n/locales/cy.json +74 -29
- package/front_end/core/i18n/locales/da.json +74 -29
- package/front_end/core/i18n/locales/de.json +76 -31
- package/front_end/core/i18n/locales/el.json +76 -31
- package/front_end/core/i18n/locales/en-GB.json +74 -29
- package/front_end/core/i18n/locales/es-419.json +74 -29
- package/front_end/core/i18n/locales/es.json +74 -29
- package/front_end/core/i18n/locales/et.json +74 -29
- package/front_end/core/i18n/locales/eu.json +76 -31
- package/front_end/core/i18n/locales/fa.json +74 -29
- package/front_end/core/i18n/locales/fi.json +75 -30
- package/front_end/core/i18n/locales/fil.json +74 -29
- package/front_end/core/i18n/locales/fr-CA.json +74 -29
- package/front_end/core/i18n/locales/fr.json +74 -29
- package/front_end/core/i18n/locales/gl.json +81 -36
- package/front_end/core/i18n/locales/gu.json +74 -29
- package/front_end/core/i18n/locales/he.json +74 -29
- package/front_end/core/i18n/locales/hi.json +74 -29
- package/front_end/core/i18n/locales/hr.json +74 -29
- package/front_end/core/i18n/locales/hu.json +74 -29
- package/front_end/core/i18n/locales/hy.json +74 -29
- package/front_end/core/i18n/locales/id.json +74 -29
- package/front_end/core/i18n/locales/is.json +74 -29
- package/front_end/core/i18n/locales/it.json +74 -29
- package/front_end/core/i18n/locales/ja.json +74 -29
- package/front_end/core/i18n/locales/ka.json +74 -29
- package/front_end/core/i18n/locales/kk.json +74 -29
- package/front_end/core/i18n/locales/km.json +74 -29
- package/front_end/core/i18n/locales/kn.json +74 -29
- package/front_end/core/i18n/locales/ko.json +74 -29
- package/front_end/core/i18n/locales/ky.json +74 -29
- package/front_end/core/i18n/locales/lo.json +74 -29
- package/front_end/core/i18n/locales/lt.json +74 -29
- package/front_end/core/i18n/locales/lv.json +74 -29
- package/front_end/core/i18n/locales/mk.json +75 -30
- package/front_end/core/i18n/locales/ml.json +74 -29
- package/front_end/core/i18n/locales/mn.json +74 -29
- package/front_end/core/i18n/locales/mr.json +74 -29
- package/front_end/core/i18n/locales/ms.json +74 -29
- package/front_end/core/i18n/locales/my.json +74 -29
- package/front_end/core/i18n/locales/ne.json +74 -29
- package/front_end/core/i18n/locales/nl.json +74 -29
- package/front_end/core/i18n/locales/no.json +74 -29
- package/front_end/core/i18n/locales/or.json +75 -30
- package/front_end/core/i18n/locales/pa.json +74 -29
- package/front_end/core/i18n/locales/pl.json +74 -29
- package/front_end/core/i18n/locales/pt-PT.json +74 -29
- package/front_end/core/i18n/locales/pt.json +74 -29
- package/front_end/core/i18n/locales/ro.json +74 -29
- package/front_end/core/i18n/locales/ru.json +78 -33
- package/front_end/core/i18n/locales/si.json +74 -29
- package/front_end/core/i18n/locales/sk.json +74 -29
- package/front_end/core/i18n/locales/sl.json +74 -29
- package/front_end/core/i18n/locales/sq.json +74 -29
- package/front_end/core/i18n/locales/sr-Latn.json +74 -29
- package/front_end/core/i18n/locales/sr.json +74 -29
- package/front_end/core/i18n/locales/sv.json +74 -29
- package/front_end/core/i18n/locales/sw.json +74 -29
- package/front_end/core/i18n/locales/ta.json +74 -29
- package/front_end/core/i18n/locales/te.json +75 -30
- package/front_end/core/i18n/locales/th.json +74 -29
- package/front_end/core/i18n/locales/tr.json +74 -29
- package/front_end/core/i18n/locales/uk.json +74 -29
- package/front_end/core/i18n/locales/ur.json +74 -29
- package/front_end/core/i18n/locales/uz.json +74 -29
- package/front_end/core/i18n/locales/vi.json +74 -29
- package/front_end/core/i18n/locales/zh-HK.json +74 -29
- package/front_end/core/i18n/locales/zh-TW.json +74 -29
- package/front_end/core/i18n/locales/zh.json +74 -29
- package/front_end/core/i18n/locales/zu.json +74 -29
- package/front_end/core/sdk/DOMModel.ts +7 -7
- package/front_end/core/sdk/ResourceTreeModel.ts +1 -1
- package/front_end/core/sdk/SourceMap.ts +45 -38
- package/front_end/core/sdk/SourceMapManager.ts +2 -2
- package/front_end/core/sdk/Target.ts +5 -4
- package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +3 -0
- package/front_end/entrypoints/formatter_worker/Substitute.ts +536 -0
- package/front_end/entrypoints/formatter_worker/formatter_worker.ts +2 -0
- package/front_end/entrypoints/node_app/NodeMain.ts +2 -1
- package/front_end/generated/InspectorBackendCommands.js +11 -9
- package/front_end/generated/protocol-mapping.d.ts +13 -0
- package/front_end/generated/protocol-proxy-api.d.ts +15 -0
- package/front_end/generated/protocol.ts +65 -9
- package/front_end/models/bindings/CompilerScriptMapping.ts +3 -2
- package/front_end/models/bindings/SASSSourceMapping.ts +1 -1
- package/front_end/models/formatter/SourceFormatter.ts +1 -1
- package/front_end/models/issues_manager/IssuesManager.ts +6 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +87 -19
- package/front_end/models/text_utils/StaticContentProvider.ts +4 -4
- package/front_end/models/workspace/UISourceCode.ts +8 -1
- package/front_end/panels/application/AppManifestView.ts +10 -4
- package/front_end/panels/application/DOMStorageItemsView.ts +2 -1
- package/front_end/panels/application/InterestGroupTreeElement.ts +3 -0
- package/front_end/panels/application/components/InterestGroupAccessGrid.ts +11 -0
- package/front_end/panels/console/ConsolePrompt.ts +9 -4
- package/front_end/panels/console/ErrorStackParser.ts +5 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +2 -1
- package/front_end/panels/network/BinaryResourceView.ts +4 -1
- package/front_end/panels/network/RequestTimingView.ts +12 -2
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +3 -2
- package/front_end/panels/sources/SourcesView.ts +51 -0
- package/front_end/panels/timeline/timelineStatusDialog.css +1 -0
- package/front_end/third_party/acorn/estree-legacy.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/README.md +15 -22
- package/front_end/third_party/puppeteer/package/cjs-entry-core.js +1 -1
- package/front_end/third_party/puppeteer/package/cjs-entry.js +1 -1
- package/front_end/third_party/puppeteer/package/install.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.js +46 -13
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.js +11 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectionTransport.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectionTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.js.map +1 -1
- 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 +3 -1
- 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/DeviceDescriptors.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DeviceDescriptors.js +336 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DeviceDescriptors.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.js +4 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.js +2 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts +9 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js +11 -0
- 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/HTTPResponse.d.ts +5 -0
- 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 +7 -0
- 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/JSHandle.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/fetch.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/fetch.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.js +13 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initialize-node.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initialize-node.js +16 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initialize-node.js.map +1 -1
- 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 +25 -4
- 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/Launcher.d.ts +5 -4
- 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 +35 -21
- 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/Puppeteer.d.ts +5 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/install.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/install.js +12 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/install.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js +46 -13
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.js +11 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectionTransport.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectionTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.js.map +1 -1
- 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 +3 -1
- 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/DeviceDescriptors.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.js +336 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.js +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.js +2 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts +9 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js +11 -0
- 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/HTTPResponse.d.ts +5 -0
- 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 +7 -0
- 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/JSHandle.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/fetch.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/fetch.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js +13 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.js +16 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.js.map +1 -1
- 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 +25 -4
- 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/Launcher.d.ts +5 -4
- 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 +35 -21
- 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/Puppeteer.d.ts +5 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/install.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/install.js +12 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/install.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +32 -18
- package/front_end/third_party/puppeteer/package/package.json +36 -35
- package/front_end/ui/components/text_editor/config.ts +17 -1
- package/front_end/ui/components/text_editor/cursor_tooltip.ts +2 -1
- package/front_end/ui/components/text_editor/javascript.ts +10 -3
- package/front_end/ui/components/text_prompt/TextPrompt.ts +9 -8
- package/front_end/ui/components/text_prompt/textPrompt.css +1 -6
- package/front_end/ui/legacy/TabbedPane.ts +3 -0
- package/front_end/ui/legacy/Toolbar.ts +25 -13
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +17 -3
- package/front_end/ui/legacy/components/source_frame/BinaryResourceViewFactory.ts +8 -8
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +1 -1
- package/package.json +1 -1
- package/scripts/build/assert_third_party_readmes.py +1 -1
@@ -288,7 +288,7 @@ export declare class Browser extends EventEmitter {
|
|
288
288
|
* const newWindowTarget = await browser.waitForTarget(target => target.url() === 'https://www.example.com/');
|
289
289
|
* ```
|
290
290
|
*/
|
291
|
-
waitForTarget(predicate: (x: Target) => boolean
|
291
|
+
waitForTarget(predicate: (x: Target) => boolean | Promise<boolean>, options?: WaitForTargetOptions): Promise<Target>;
|
292
292
|
/**
|
293
293
|
* An array of all open pages inside the Browser.
|
294
294
|
*
|
@@ -425,7 +425,7 @@ export declare class BrowserContext extends EventEmitter {
|
|
425
425
|
* @returns Promise which resolves to the first target found
|
426
426
|
* that matches the `predicate` function.
|
427
427
|
*/
|
428
|
-
waitForTarget(predicate: (x: Target) => boolean
|
428
|
+
waitForTarget(predicate: (x: Target) => boolean | Promise<boolean>, options?: {
|
429
429
|
timeout?: number;
|
430
430
|
}): Promise<Target>;
|
431
431
|
/**
|
@@ -751,7 +751,7 @@ export declare class CDPSession extends EventEmitter {
|
|
751
751
|
/**
|
752
752
|
* @internal
|
753
753
|
*/
|
754
|
-
_connection
|
754
|
+
_connection?: Connection;
|
755
755
|
private _sessionId;
|
756
756
|
private _targetType;
|
757
757
|
private _callbacks;
|
@@ -759,7 +759,7 @@ export declare class CDPSession extends EventEmitter {
|
|
759
759
|
* @internal
|
760
760
|
*/
|
761
761
|
constructor(connection: Connection, targetType: string, sessionId: string);
|
762
|
-
connection(): Connection;
|
762
|
+
connection(): Connection | undefined;
|
763
763
|
send<T extends keyof ProtocolMapping.Commands>(method: T, ...paramArgs: ProtocolMapping.Commands[T]['paramsType']): Promise<ProtocolMapping.Commands[T]['returnType']>;
|
764
764
|
/**
|
765
765
|
* @internal
|
@@ -866,7 +866,7 @@ export declare interface CommonEventEmitter {
|
|
866
866
|
}
|
867
867
|
|
868
868
|
/**
|
869
|
-
* Settings that are common to the Puppeteer class, regardless of
|
869
|
+
* Settings that are common to the Puppeteer class, regardless of environment.
|
870
870
|
* @internal
|
871
871
|
*/
|
872
872
|
export declare interface CommonPuppeteerSettings {
|
@@ -891,7 +891,7 @@ export declare class Connection extends EventEmitter {
|
|
891
891
|
_closed: boolean;
|
892
892
|
_callbacks: Map<number, ConnectionCallback>;
|
893
893
|
constructor(url: string, transport: ConnectionTransport, delay?: number);
|
894
|
-
static fromSession(session: CDPSession): Connection;
|
894
|
+
static fromSession(session: CDPSession): Connection | undefined;
|
895
895
|
/**
|
896
896
|
* @param sessionId - The session id
|
897
897
|
* @returns The current CDP session if it exists
|
@@ -948,8 +948,8 @@ export declare const ConnectionEmittedEvents: {
|
|
948
948
|
* @public
|
949
949
|
*/
|
950
950
|
export declare interface ConnectionTransport {
|
951
|
-
send(
|
952
|
-
close():
|
951
|
+
send(message: string): void;
|
952
|
+
close(): void;
|
953
953
|
onmessage?: (message: string) => void;
|
954
954
|
onclose?: () => void;
|
955
955
|
}
|
@@ -1952,7 +1952,7 @@ export declare class ExecutionContext {
|
|
1952
1952
|
*
|
1953
1953
|
* @returns A promise that resolves to the return value of the given function.
|
1954
1954
|
*/
|
1955
|
-
evaluate<ReturnType
|
1955
|
+
evaluate<ReturnType>(pageFunction: Function | string, ...args: unknown[]): Promise<ReturnType>;
|
1956
1956
|
/**
|
1957
1957
|
* @remarks
|
1958
1958
|
* The only difference between `executionContext.evaluate` and
|
@@ -2171,6 +2171,11 @@ export declare class Frame {
|
|
2171
2171
|
* @internal
|
2172
2172
|
*/
|
2173
2173
|
_updateClient(client: CDPSession): void;
|
2174
|
+
/**
|
2175
|
+
* @remarks
|
2176
|
+
*
|
2177
|
+
* @returns `true` if the frame is an OOP frame, or `false` otherwise.
|
2178
|
+
*/
|
2174
2179
|
isOOPFrame(): boolean;
|
2175
2180
|
/**
|
2176
2181
|
* @remarks
|
@@ -2240,6 +2245,10 @@ export declare class Frame {
|
|
2240
2245
|
timeout?: number;
|
2241
2246
|
waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[];
|
2242
2247
|
}): Promise<HTTPResponse | null>;
|
2248
|
+
/**
|
2249
|
+
* @internal
|
2250
|
+
*/
|
2251
|
+
client(): CDPSession;
|
2243
2252
|
/**
|
2244
2253
|
* @returns a promise that resolves to the frame's default execution context.
|
2245
2254
|
*/
|
@@ -3142,6 +3151,7 @@ export declare class HTTPResponse {
|
|
3142
3151
|
private _fromServiceWorker;
|
3143
3152
|
private _headers;
|
3144
3153
|
private _securityDetails;
|
3154
|
+
private _timing;
|
3145
3155
|
/**
|
3146
3156
|
* @internal
|
3147
3157
|
*/
|
@@ -3186,6 +3196,10 @@ export declare class HTTPResponse {
|
|
3186
3196
|
* secure connection, or `null` otherwise.
|
3187
3197
|
*/
|
3188
3198
|
securityDetails(): SecurityDetails | null;
|
3199
|
+
/**
|
3200
|
+
* @returns Timing information related to the response.
|
3201
|
+
*/
|
3202
|
+
timing(): Protocol.Network.ResourceTiming | null;
|
3189
3203
|
/**
|
3190
3204
|
* @returns Promise which resolves to a buffer with response body.
|
3191
3205
|
*/
|
@@ -6232,9 +6246,9 @@ export declare class HTTPResponse {
|
|
6232
6246
|
* @public
|
6233
6247
|
*/
|
6234
6248
|
export declare interface ProductLauncher {
|
6235
|
-
launch(object: PuppeteerNodeLaunchOptions):
|
6236
|
-
executablePath: (
|
6237
|
-
defaultArgs(object: BrowserLaunchArgumentOptions):
|
6249
|
+
launch(object: PuppeteerNodeLaunchOptions): Promise<Browser>;
|
6250
|
+
executablePath: (path?: any) => string;
|
6251
|
+
defaultArgs(object: BrowserLaunchArgumentOptions): string[];
|
6238
6252
|
product: Product;
|
6239
6253
|
}
|
6240
6254
|
|
@@ -6436,8 +6450,8 @@ export declare class HTTPResponse {
|
|
6436
6450
|
* @public
|
6437
6451
|
*/
|
6438
6452
|
export declare class PuppeteerNode extends Puppeteer {
|
6439
|
-
private _lazyLauncher
|
6440
|
-
private _projectRoot
|
6453
|
+
private _lazyLauncher?;
|
6454
|
+
private _projectRoot?;
|
6441
6455
|
private __productName?;
|
6442
6456
|
/**
|
6443
6457
|
* @internal
|
@@ -6447,7 +6461,7 @@ export declare class HTTPResponse {
|
|
6447
6461
|
* @internal
|
6448
6462
|
*/
|
6449
6463
|
constructor(settings: {
|
6450
|
-
projectRoot
|
6464
|
+
projectRoot?: string;
|
6451
6465
|
preferredRevision: string;
|
6452
6466
|
productName?: Product;
|
6453
6467
|
} & CommonPuppeteerSettings);
|
@@ -6463,8 +6477,8 @@ export declare class HTTPResponse {
|
|
6463
6477
|
/**
|
6464
6478
|
* @internal
|
6465
6479
|
*/
|
6466
|
-
get _productName(): Product;
|
6467
|
-
set _productName(name: Product);
|
6480
|
+
get _productName(): Product | undefined;
|
6481
|
+
set _productName(name: Product | undefined);
|
6468
6482
|
/**
|
6469
6483
|
* Launches puppeteer and launches a browser instance with given arguments
|
6470
6484
|
* and options when specified.
|
@@ -7211,7 +7225,7 @@ export declare class HTTPResponse {
|
|
7211
7225
|
* @param args - Arguments to pass to `pageFunction`.
|
7212
7226
|
* @returns Promise which resolves to the return value of `pageFunction`.
|
7213
7227
|
*/
|
7214
|
-
evaluate<ReturnType
|
7228
|
+
evaluate<ReturnType>(pageFunction: Function | string, ...args: any[]): Promise<ReturnType>;
|
7215
7229
|
/**
|
7216
7230
|
* The only difference between `worker.evaluate` and `worker.evaluateHandle`
|
7217
7231
|
* is that `worker.evaluateHandle` returns in-page object (JSHandle). If the
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "puppeteer",
|
3
|
-
"version": "13.
|
3
|
+
"version": "13.4.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",
|
@@ -24,9 +24,9 @@
|
|
24
24
|
"eslint": "([ \"$CI\" = true ] && eslint --ext js --ext ts --quiet -f codeframe . || eslint --ext js --ext ts .)",
|
25
25
|
"eslint-fix": "eslint --ext js --ext ts --fix .",
|
26
26
|
"commitlint": "commitlint --from=HEAD~1",
|
27
|
-
"
|
28
|
-
"
|
29
|
-
"lint": "npm run eslint && npm run build && npm run doc && npm run
|
27
|
+
"prettier": "prettier --check .",
|
28
|
+
"prettier-fix": "prettier --write .",
|
29
|
+
"lint": "npm run eslint && npm run build && npm run doc && npm run prettier",
|
30
30
|
"doc": "node utils/doclint/cli.js",
|
31
31
|
"clean-lib": "rimraf lib",
|
32
32
|
"build": "npm run tsc && npm run generate-d-ts",
|
@@ -58,60 +58,61 @@
|
|
58
58
|
"author": "The Chromium Authors",
|
59
59
|
"license": "Apache-2.0",
|
60
60
|
"dependencies": {
|
61
|
-
"
|
62
|
-
"
|
61
|
+
"cross-fetch": "3.1.5",
|
62
|
+
"debug": "4.3.3",
|
63
|
+
"devtools-protocol": "0.0.960912",
|
63
64
|
"extract-zip": "2.0.1",
|
64
65
|
"https-proxy-agent": "5.0.0",
|
65
|
-
"node-fetch": "2.6.5",
|
66
66
|
"pkg-dir": "4.2.0",
|
67
67
|
"progress": "2.0.3",
|
68
68
|
"proxy-from-env": "1.1.0",
|
69
69
|
"rimraf": "3.0.2",
|
70
70
|
"tar-fs": "2.1.1",
|
71
71
|
"unbzip2-stream": "1.4.3",
|
72
|
-
"ws": "8.
|
72
|
+
"ws": "8.5.0"
|
73
73
|
},
|
74
74
|
"devDependencies": {
|
75
|
-
"@commitlint/cli": "
|
76
|
-
"@commitlint/config-conventional": "
|
77
|
-
"@microsoft/api-documenter": "7.
|
78
|
-
"@microsoft/api-extractor": "7.
|
75
|
+
"@commitlint/cli": "16.2.1",
|
76
|
+
"@commitlint/config-conventional": "16.2.1",
|
77
|
+
"@microsoft/api-documenter": "7.15.3",
|
78
|
+
"@microsoft/api-extractor": "7.19.4",
|
79
79
|
"@types/debug": "4.1.7",
|
80
80
|
"@types/mime": "2.0.3",
|
81
|
-
"@types/mocha": "9.
|
82
|
-
"@types/node": "
|
81
|
+
"@types/mocha": "9.1.0",
|
82
|
+
"@types/node": "17.0.19",
|
83
|
+
"@types/progress": "2.0.5",
|
83
84
|
"@types/proxy-from-env": "1.0.1",
|
84
85
|
"@types/rimraf": "3.0.2",
|
85
|
-
"@types/sinon": "10.0.
|
86
|
+
"@types/sinon": "10.0.11",
|
86
87
|
"@types/tar-fs": "2.0.1",
|
87
|
-
"@types/ws": "8.2.
|
88
|
-
"@typescript-eslint/eslint-plugin": "
|
89
|
-
"@typescript-eslint/parser": "
|
90
|
-
"@web/test-runner": "0.13.
|
91
|
-
"commonmark": "0.
|
88
|
+
"@types/ws": "8.2.3",
|
89
|
+
"@typescript-eslint/eslint-plugin": "5.12.1",
|
90
|
+
"@typescript-eslint/parser": "5.12.1",
|
91
|
+
"@web/test-runner": "0.13.27",
|
92
|
+
"commonmark": "0.30.0",
|
92
93
|
"cross-env": "7.0.3",
|
93
|
-
"eslint": "
|
94
|
-
"eslint-config-prettier": "8.
|
95
|
-
"eslint-plugin-import": "2.
|
96
|
-
"eslint-plugin-mocha": "
|
94
|
+
"eslint": "8.9.0",
|
95
|
+
"eslint-config-prettier": "8.4.0",
|
96
|
+
"eslint-plugin-import": "2.25.4",
|
97
|
+
"eslint-plugin-mocha": "10.0.3",
|
97
98
|
"eslint-plugin-prettier": "4.0.0",
|
98
|
-
"eslint-plugin-unicorn": "
|
99
|
+
"eslint-plugin-unicorn": "41.0.0",
|
99
100
|
"esprima": "4.0.1",
|
100
101
|
"expect": "25.2.7",
|
101
|
-
"husky": "7.0.
|
102
|
-
"jpeg-js": "0.3
|
103
|
-
"mime": "
|
104
|
-
"minimist": "1.2.
|
105
|
-
"mocha": "9.1
|
102
|
+
"husky": "7.0.4",
|
103
|
+
"jpeg-js": "0.4.3",
|
104
|
+
"mime": "3.0.0",
|
105
|
+
"minimist": "1.2.5",
|
106
|
+
"mocha": "9.2.1",
|
106
107
|
"ncp": "2.0.0",
|
107
108
|
"pixelmatch": "5.2.1",
|
108
109
|
"pngjs": "6.0.0",
|
109
|
-
"prettier": "2.
|
110
|
-
"sinon": "
|
111
|
-
"source-map-support": "0.5.
|
110
|
+
"prettier": "2.5.1",
|
111
|
+
"sinon": "13.0.1",
|
112
|
+
"source-map-support": "0.5.21",
|
112
113
|
"standard-version": "9.3.2",
|
113
114
|
"text-diff": "1.0.1",
|
114
|
-
"ts-node": "10.
|
115
|
-
"typescript": "4.
|
115
|
+
"ts-node": "10.5.0",
|
116
|
+
"typescript": "4.5.5"
|
116
117
|
}
|
117
118
|
}
|
@@ -7,6 +7,7 @@ import * as i18n from '../../../core/i18n/i18n.js';
|
|
7
7
|
import * as WindowBoundsService from '../../../services/window_bounds/window_bounds.js';
|
8
8
|
import * as CM from '../../../third_party/codemirror.next/codemirror.next.js';
|
9
9
|
import * as CodeHighlighter from '../code_highlighter/code_highlighter.js';
|
10
|
+
import * as Icon from '../icon_button/icon_button.js';
|
10
11
|
|
11
12
|
import {editorTheme} from './theme.js';
|
12
13
|
|
@@ -82,7 +83,22 @@ export const sourcesAutocompletion = DynamicSetting.bool('textEditorAutocompleti
|
|
82
83
|
|
83
84
|
export const bracketMatching = DynamicSetting.bool('textEditorBracketMatching', CM.bracketMatching());
|
84
85
|
|
85
|
-
export const codeFolding = DynamicSetting.bool('textEditorCodeFolding', [
|
86
|
+
export const codeFolding = DynamicSetting.bool('textEditorCodeFolding', [
|
87
|
+
CM.foldGutter({
|
88
|
+
markerDOM(open: boolean): HTMLElement {
|
89
|
+
const iconName = open ? 'triangle-expanded' : 'triangle-collapsed';
|
90
|
+
const icon = new Icon.Icon.Icon();
|
91
|
+
icon.data = {
|
92
|
+
iconName,
|
93
|
+
color: 'var(--color-text-secondary)',
|
94
|
+
width: '12px',
|
95
|
+
height: '12px',
|
96
|
+
};
|
97
|
+
return icon;
|
98
|
+
},
|
99
|
+
}),
|
100
|
+
CM.keymap.of(CM.foldKeymap),
|
101
|
+
]);
|
86
102
|
|
87
103
|
export function guessIndent(doc: CM.Text): string {
|
88
104
|
const values: {[indent: string]: number} = Object.create(null);
|
@@ -4,11 +4,12 @@
|
|
4
4
|
|
5
5
|
import * as CodeMirror from '../../../third_party/codemirror.next/codemirror.next.js';
|
6
6
|
|
7
|
+
export type ArgumentHintsTooltip = [CodeMirror.StateField<CodeMirror.Tooltip|null>, CodeMirror.ViewPlugin<{}>];
|
7
8
|
export const closeTooltip = CodeMirror.StateEffect.define<null>();
|
8
9
|
|
9
10
|
export function cursorTooltip(
|
10
11
|
source: (state: CodeMirror.EditorState, pos: number) => Promise<(() => CodeMirror.TooltipView)|null>,
|
11
|
-
):
|
12
|
+
): ArgumentHintsTooltip {
|
12
13
|
const openTooltip = CodeMirror.StateEffect.define<() => CodeMirror.TooltipView>();
|
13
14
|
|
14
15
|
const state = CodeMirror.StateField.define<null|CodeMirror.Tooltip>({
|
@@ -8,7 +8,7 @@ import * as JavaScriptMetaData from '../../../models/javascript_metadata/javascr
|
|
8
8
|
import * as CodeMirror from '../../../third_party/codemirror.next/codemirror.next.js';
|
9
9
|
import * as UI from '../../legacy/legacy.js';
|
10
10
|
|
11
|
-
import {closeTooltip, cursorTooltip} from './cursor_tooltip.js';
|
11
|
+
import {type ArgumentHintsTooltip, closeTooltip, cursorTooltip} from './cursor_tooltip.js';
|
12
12
|
|
13
13
|
export function completion(): CodeMirror.Extension {
|
14
14
|
return CodeMirror.javascript.javascriptLanguage.data.of({
|
@@ -421,12 +421,19 @@ export async function isExpressionComplete(expression: string): Promise<boolean>
|
|
421
421
|
return false;
|
422
422
|
}
|
423
423
|
|
424
|
-
export function argumentHints():
|
424
|
+
export function argumentHints(): ArgumentHintsTooltip {
|
425
425
|
return cursorTooltip(getArgumentHints);
|
426
426
|
}
|
427
427
|
|
428
|
-
export function closeArgumentsHintsTooltip(
|
428
|
+
export function closeArgumentsHintsTooltip(
|
429
|
+
view: CodeMirror.EditorView, tooltip: CodeMirror.StateField<CodeMirror.Tooltip|null>): boolean {
|
430
|
+
// If the tooltip is currently showing, the state will reflect its properties.
|
431
|
+
// If it isn't showing, the state is explicitly set to `null`.
|
432
|
+
if (view.state.field(tooltip) === null) {
|
433
|
+
return false;
|
434
|
+
}
|
429
435
|
view.dispatch({effects: closeTooltip.of(null)});
|
436
|
+
return true;
|
430
437
|
}
|
431
438
|
|
432
439
|
async function getArgumentHints(
|
@@ -55,7 +55,7 @@ export class TextPrompt extends HTMLElement {
|
|
55
55
|
}
|
56
56
|
|
57
57
|
#input(): HTMLInputElement {
|
58
|
-
const inputElement = this.#shadow.querySelector<HTMLInputElement>('input');
|
58
|
+
const inputElement = this.#shadow.querySelector<HTMLInputElement>('.input');
|
59
59
|
if (!inputElement) {
|
60
60
|
throw new Error('Expected an input element!');
|
61
61
|
}
|
@@ -67,7 +67,7 @@ export class TextPrompt extends HTMLElement {
|
|
67
67
|
}
|
68
68
|
|
69
69
|
onInput(): void {
|
70
|
-
this.#suggestion().
|
70
|
+
this.#suggestion().value = this.#text();
|
71
71
|
this.dispatchEvent(new PromptInputEvent(this.#text().trim()));
|
72
72
|
}
|
73
73
|
|
@@ -98,12 +98,13 @@ export class TextPrompt extends HTMLElement {
|
|
98
98
|
|
99
99
|
setSuggestion(suggestion: string): void {
|
100
100
|
this.#suggestionText = suggestion;
|
101
|
+
this.#suggestion().value += this.#suggestionText;
|
101
102
|
this.#render();
|
102
103
|
}
|
103
104
|
|
104
105
|
setText(text: string): void {
|
105
106
|
this.#input().value = text;
|
106
|
-
this.#suggestion().
|
107
|
+
this.#suggestion().value = this.#text();
|
107
108
|
|
108
109
|
if (this.#input().hasFocus()) {
|
109
110
|
this.moveCaretToEndOfInput();
|
@@ -111,8 +112,8 @@ export class TextPrompt extends HTMLElement {
|
|
111
112
|
}
|
112
113
|
}
|
113
114
|
|
114
|
-
#suggestion():
|
115
|
-
const suggestionElement = this.#shadow.querySelector<
|
115
|
+
#suggestion(): HTMLInputElement {
|
116
|
+
const suggestionElement = this.#shadow.querySelector<HTMLInputElement>('.suggestion');
|
116
117
|
if (!suggestionElement) {
|
117
118
|
throw new Error('Expected an suggestion element!');
|
118
119
|
}
|
@@ -126,9 +127,9 @@ export class TextPrompt extends HTMLElement {
|
|
126
127
|
#render(): void {
|
127
128
|
const output = LitHtml.html`
|
128
129
|
<span class="prefix">${this.#prefixText} </span>
|
129
|
-
<span class="text-prompt-input"><input
|
130
|
-
this
|
131
|
-
this.#
|
130
|
+
<span class="text-prompt-input"><input class="input" aria-label=${
|
131
|
+
this.#ariaLabelText} spellcheck="false" @input=${this.onInput} @keydown=${
|
132
|
+
this.onKeyDown}/><input class="suggestion" aria-label=${this.#ariaLabelText + ' Suggestion'}></span>`;
|
132
133
|
LitHtml.render(output, this.#shadow, {host: this});
|
133
134
|
}
|
134
135
|
}
|
@@ -32,13 +32,8 @@
|
|
32
32
|
}
|
33
33
|
|
34
34
|
.text-prompt-input .suggestion {
|
35
|
-
color:
|
35
|
+
color: var(--color-background-highlight);
|
36
36
|
position: absolute;
|
37
37
|
left: 0;
|
38
38
|
z-index: 1;
|
39
39
|
}
|
40
|
-
|
41
|
-
.text-prompt-input .suggestion::after {
|
42
|
-
content: attr(suggestion);
|
43
|
-
color: var(--color-background-highlight);
|
44
|
-
}
|
@@ -1019,6 +1019,9 @@ export class TabbedPaneTab {
|
|
1019
1019
|
this.titleInternal = title;
|
1020
1020
|
if (this.titleElement) {
|
1021
1021
|
this.titleElement.textContent = title;
|
1022
|
+
const closeIconContainer = this.tabElementInternal?.querySelector('.close-button');
|
1023
|
+
closeIconContainer?.setAttribute('title', i18nString(UIStrings.closeS, {PH1: title}));
|
1024
|
+
closeIconContainer?.setAttribute('aria-label', i18nString(UIStrings.closeS, {PH1: title}));
|
1022
1025
|
}
|
1023
1026
|
delete this.measuredWidth;
|
1024
1027
|
}
|
@@ -542,6 +542,7 @@ export class ToolbarButton extends ToolbarItem<ToolbarButton.EventTypes> {
|
|
542
542
|
private textElement: HTMLElement;
|
543
543
|
private text?: string;
|
544
544
|
private glyph?: string;
|
545
|
+
private icon?: HTMLElement;
|
545
546
|
/**
|
546
547
|
* TODO(crbug.com/1126026): remove glyph parameter in favor of icon.
|
547
548
|
*/
|
@@ -557,11 +558,8 @@ export class ToolbarButton extends ToolbarItem<ToolbarButton.EventTypes> {
|
|
557
558
|
this.textElement = this.element.createChild('div', 'toolbar-text hidden');
|
558
559
|
|
559
560
|
this.setTitle(title);
|
560
|
-
if (glyphOrIcon
|
561
|
-
|
562
|
-
this.element.append(glyphOrIcon);
|
563
|
-
} else if (glyphOrIcon) {
|
564
|
-
this.setGlyph(glyphOrIcon);
|
561
|
+
if (glyphOrIcon) {
|
562
|
+
this.setGlyphOrIcon(glyphOrIcon);
|
565
563
|
}
|
566
564
|
this.setText(text || '');
|
567
565
|
this.title = '';
|
@@ -580,6 +578,20 @@ export class ToolbarButton extends ToolbarItem<ToolbarButton.EventTypes> {
|
|
580
578
|
this.text = text;
|
581
579
|
}
|
582
580
|
|
581
|
+
setGlyphOrIcon(glyphOrIcon: string|HTMLElement): void {
|
582
|
+
if (glyphOrIcon instanceof HTMLElement) {
|
583
|
+
glyphOrIcon.classList.add('toolbar-icon');
|
584
|
+
if (this.icon) {
|
585
|
+
this.icon.replaceWith(glyphOrIcon);
|
586
|
+
} else {
|
587
|
+
this.element.appendChild(glyphOrIcon);
|
588
|
+
}
|
589
|
+
this.icon = glyphOrIcon;
|
590
|
+
} else if (glyphOrIcon) {
|
591
|
+
this.setGlyph(glyphOrIcon);
|
592
|
+
}
|
593
|
+
}
|
594
|
+
|
583
595
|
setGlyph(glyph: string): void {
|
584
596
|
if (this.glyph === glyph) {
|
585
597
|
return;
|
@@ -739,14 +751,14 @@ export namespace ToolbarInput {
|
|
739
751
|
|
740
752
|
export class ToolbarToggle extends ToolbarButton {
|
741
753
|
private toggledInternal: boolean;
|
742
|
-
private readonly
|
743
|
-
private readonly
|
754
|
+
private readonly untoggledGlyphOrIcon: string|HTMLElement|undefined;
|
755
|
+
private readonly toggledGlyphOrIcon: string|HTMLElement|undefined;
|
744
756
|
|
745
|
-
constructor(title: string,
|
746
|
-
super(title,
|
757
|
+
constructor(title: string, glyphOrIcon?: string|HTMLElement, toggledGlyphOrIcon?: string|HTMLElement) {
|
758
|
+
super(title, glyphOrIcon, '');
|
747
759
|
this.toggledInternal = false;
|
748
|
-
this.
|
749
|
-
this.
|
760
|
+
this.untoggledGlyphOrIcon = glyphOrIcon;
|
761
|
+
this.toggledGlyphOrIcon = toggledGlyphOrIcon;
|
750
762
|
this.element.classList.add('toolbar-state-off');
|
751
763
|
ARIAUtils.setPressed(this.element, false);
|
752
764
|
}
|
@@ -763,8 +775,8 @@ export class ToolbarToggle extends ToolbarButton {
|
|
763
775
|
this.element.classList.toggle('toolbar-state-on', toggled);
|
764
776
|
this.element.classList.toggle('toolbar-state-off', !toggled);
|
765
777
|
ARIAUtils.setPressed(this.element, toggled);
|
766
|
-
if (this.
|
767
|
-
this.
|
778
|
+
if (this.toggledGlyphOrIcon && this.untoggledGlyphOrIcon) {
|
779
|
+
this.setGlyphOrIcon(toggled ? this.toggledGlyphOrIcon : this.untoggledGlyphOrIcon);
|
768
780
|
}
|
769
781
|
}
|
770
782
|
|
@@ -1018,9 +1018,23 @@ export class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
1018
1018
|
this.property.value, this.property.wasThrown, showPreview, this.listItemElement, this.linkifier);
|
1019
1019
|
this.valueElement = (this.propertyValue.element as HTMLElement);
|
1020
1020
|
} else if (this.property.getter) {
|
1021
|
-
this.valueElement =
|
1022
|
-
|
1023
|
-
|
1021
|
+
this.valueElement = document.createElement('span');
|
1022
|
+
const element = this.valueElement.createChild('span');
|
1023
|
+
element.textContent = i18nString(UIStrings.dots);
|
1024
|
+
element.classList.add('object-value-calculate-value-button');
|
1025
|
+
UI.Tooltip.Tooltip.install(element, i18nString(UIStrings.invokePropertyGetter));
|
1026
|
+
const object = parentMap.get(this.property) as SDK.RemoteObject.RemoteObject;
|
1027
|
+
const getter = this.property.getter;
|
1028
|
+
element.addEventListener('click', (event: Event) => {
|
1029
|
+
event.consume();
|
1030
|
+
// @ts-ignore No way to teach TypeScript to preserve the Function-ness of `getter`.
|
1031
|
+
void object.callFunction(invokeGetter, [SDK.RemoteObject.RemoteObject.toCallArgument(getter)])
|
1032
|
+
.then(this.onInvokeGetterClick.bind(this));
|
1033
|
+
|
1034
|
+
function invokeGetter(this: Object, getter: Function): Object {
|
1035
|
+
return Reflect.apply(getter, this, []);
|
1036
|
+
}
|
1037
|
+
}, false);
|
1024
1038
|
} else {
|
1025
1039
|
this.valueElement = document.createElement('span');
|
1026
1040
|
this.valueElement.classList.add('object-value-undefined');
|
@@ -8,16 +8,16 @@ import * as TextUtils from '../../../../models/text_utils/text_utils.js';
|
|
8
8
|
|
9
9
|
import {ResourceSourceFrame} from './ResourceSourceFrame.js';
|
10
10
|
|
11
|
-
// TODO(crbug.com/1253323): Casts to UrlString will be removed from this file when migration to branded types is complete.
|
12
|
-
|
13
11
|
export class BinaryResourceViewFactory {
|
14
12
|
private base64content: string;
|
15
|
-
private readonly contentUrl:
|
13
|
+
private readonly contentUrl: Platform.DevToolsPath.UrlString;
|
16
14
|
private readonly resourceType: Common.ResourceType.ResourceType;
|
17
15
|
private arrayPromise: Promise<Uint8Array>|null;
|
18
16
|
private hexPromise: Promise<TextUtils.ContentProvider.DeferredContent>|null;
|
19
17
|
private utf8Promise: Promise<TextUtils.ContentProvider.DeferredContent>|null;
|
20
|
-
constructor(
|
18
|
+
constructor(
|
19
|
+
base64content: string, contentUrl: Platform.DevToolsPath.UrlString,
|
20
|
+
resourceType: Common.ResourceType.ResourceType) {
|
21
21
|
this.base64content = base64content;
|
22
22
|
this.contentUrl = contentUrl;
|
23
23
|
this.resourceType = resourceType;
|
@@ -70,8 +70,8 @@ export class BinaryResourceViewFactory {
|
|
70
70
|
}
|
71
71
|
|
72
72
|
createHexView(): ResourceSourceFrame {
|
73
|
-
const hexViewerContentProvider =
|
74
|
-
this.contentUrl
|
73
|
+
const hexViewerContentProvider =
|
74
|
+
new TextUtils.StaticContentProvider.StaticContentProvider(this.contentUrl, this.resourceType, async () => {
|
75
75
|
const contentAsArray = await this.fetchContentAsArray();
|
76
76
|
const content = BinaryResourceViewFactory.uint8ArrayToHexViewer(contentAsArray);
|
77
77
|
return {content, isEncoded: false};
|
@@ -82,8 +82,8 @@ export class BinaryResourceViewFactory {
|
|
82
82
|
|
83
83
|
createUtf8View(): ResourceSourceFrame {
|
84
84
|
const utf8fn = this.utf8.bind(this);
|
85
|
-
const utf8ContentProvider =
|
86
|
-
this.contentUrl
|
85
|
+
const utf8ContentProvider =
|
86
|
+
new TextUtils.StaticContentProvider.StaticContentProvider(this.contentUrl, this.resourceType, utf8fn);
|
87
87
|
return new ResourceSourceFrame(
|
88
88
|
utf8ContentProvider, this.resourceType.canonicalMimeType(), {lineNumbers: true, lineWrapping: true});
|
89
89
|
}
|
@@ -211,7 +211,7 @@ export class SourceFrameImpl extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
211
211
|
TextEditor.Config.sourcesAutocompletion.instance(),
|
212
212
|
TextEditor.Config.showWhitespace.instance(),
|
213
213
|
TextEditor.Config.allowScrollPastEof.instance(),
|
214
|
-
TextEditor.Config.codeFolding.instance(),
|
214
|
+
CodeMirror.Prec.lowest(TextEditor.Config.codeFolding.instance()),
|
215
215
|
TextEditor.Config.autoDetectIndent.instance(),
|
216
216
|
sourceFrameTheme,
|
217
217
|
CodeMirror.EditorView.domEventHandlers({
|
package/package.json
CHANGED
@@ -54,7 +54,7 @@ def main(argv):
|
|
54
54
|
print(
|
55
55
|
"Directory `" + listed_directory + "`" +
|
56
56
|
" is not included in `config/gni/devtools_grd_files.gni`." +
|
57
|
-
" Make sure to only include third_party
|
57
|
+
" Make sure to only include third_party directories that are shipped"
|
58
58
|
+ " in Chromium.\n")
|
59
59
|
|
60
60
|
return_code = 1
|