chrome-devtools-frontend 1.0.959844 → 1.0.961109
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/.vscode/devtools-workspace-launch.json +29 -0
- package/.vscode/devtools-workspace-settings.json +6 -1
- package/.vscode/devtools-workspace-tasks.json +28 -0
- package/config/gni/devtools_grd_files.gni +1 -0
- package/front_end/core/common/ParsedURL.ts +5 -2
- package/front_end/core/host/UserMetrics.ts +2 -1
- package/front_end/core/i18n/locales/en-US.json +30 -0
- package/front_end/core/i18n/locales/en-XL.json +30 -0
- package/front_end/core/sdk/DebuggerModel.ts +8 -1
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +3 -0
- package/front_end/core/sdk/SourceMap.ts +9 -1
- package/front_end/entrypoints/main/MainImpl.ts +5 -0
- package/front_end/generated/InspectorBackendCommands.js +21 -2
- package/front_end/generated/SupportedCSSProperties.js +3 -1
- package/front_end/generated/protocol-mapping.d.ts +17 -1
- package/front_end/generated/protocol-proxy-api.d.ts +18 -1
- package/front_end/generated/protocol.d.ts +79 -0
- package/front_end/panels/application/IndexedDBModel.ts +3 -0
- package/front_end/panels/console/ConsoleView.ts +10 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +5 -106
- package/front_end/panels/console/ErrorStackParser.ts +117 -0
- package/front_end/panels/console/console.ts +2 -0
- package/front_end/panels/elements/ElementsPanel.ts +10 -1
- package/front_end/panels/snippets/SnippetsQuickOpen.ts +5 -0
- package/front_end/panels/sources/BreakpointEditDialog.ts +1 -1
- package/front_end/panels/sources/DebuggerPlugin.ts +7 -1
- package/front_end/panels/sources/SourcesPanel.ts +20 -2
- package/front_end/panels/timeline/TimelineTreeView.ts +10 -1
- package/front_end/third_party/acorn/README.chromium +1 -1
- package/front_end/third_party/acorn-loose/README.chromium +2 -2
- package/front_end/third_party/additional_readme_paths.json +14 -0
- package/front_end/third_party/codemirror/README.chromium +2 -2
- package/front_end/third_party/codemirror.next/README.chromium +1 -1
- package/front_end/third_party/lighthouse/README.chromium +1 -1
- package/front_end/third_party/lit-html/README.chromium +2 -2
- package/front_end/third_party/marked/README.chromium +2 -2
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/README.md +11 -11
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts +0 -1
- 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 +2 -1
- 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/JSHandle.d.ts +3 -1
- 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 +40 -8
- 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/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts +0 -1
- 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 +2 -1
- 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/JSHandle.d.ts +3 -1
- 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 +40 -8
- 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/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/package.json +2 -2
- package/front_end/third_party/wasmparser/README.chromium +2 -2
- package/front_end/ui/components/buttons/Button.ts +6 -1
- package/front_end/ui/components/buttons/button.css +0 -1
- package/front_end/ui/components/docs/button/basic.ts +1 -0
- package/front_end/ui/legacy/SplitWidget.ts +6 -2
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +10 -8
- package/front_end/ui/legacy/toolbar.css +4 -0
- package/package.json +1 -1
- package/scripts/build/assert_third_party_readmes.py +68 -0
- package/front_end/third_party/acorn/LICENSE +0 -19
- package/front_end/third_party/acorn-loose/LICENSE +0 -19
- package/front_end/third_party/codemirror/LICENSE +0 -21
- package/front_end/third_party/lit-html/LICENSE +0 -28
- package/front_end/third_party/wasmparser/LICENSE +0 -177
@@ -56,6 +56,7 @@ import type {Chrome} from '../../../extension-api/ExtensionAPI.js'; // eslint-di
|
|
56
56
|
import {format} from './ConsoleFormat.js';
|
57
57
|
import type {ConsoleViewportElement} from './ConsoleViewport.js';
|
58
58
|
import consoleViewStyles from './consoleView.css.js';
|
59
|
+
import {parseSourcePositionsFromErrorStack} from './ErrorStackParser.js';
|
59
60
|
|
60
61
|
const UIStrings = {
|
61
62
|
/**
|
@@ -1422,100 +1423,17 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
1422
1423
|
}
|
1423
1424
|
|
1424
1425
|
private tryFormatAsError(string: string): HTMLElement|null {
|
1425
|
-
function startsWith(prefix: string): boolean {
|
1426
|
-
return string.startsWith(prefix);
|
1427
|
-
}
|
1428
|
-
|
1429
1426
|
const runtimeModel = this.message.runtimeModel();
|
1430
|
-
|
1431
|
-
const errorPrefixes = [
|
1432
|
-
'AggregateError',
|
1433
|
-
'Error',
|
1434
|
-
'EvalError',
|
1435
|
-
'RangeError',
|
1436
|
-
'ReferenceError',
|
1437
|
-
'SyntaxError',
|
1438
|
-
'TypeError',
|
1439
|
-
'URIError',
|
1440
|
-
];
|
1441
|
-
if (!runtimeModel || !errorPrefixes.some(startsWith) && !/^[\w.]+Error\b/.test(string)) {
|
1427
|
+
if (!runtimeModel) {
|
1442
1428
|
return null;
|
1443
1429
|
}
|
1444
|
-
const debuggerModel = runtimeModel.debuggerModel();
|
1445
|
-
const baseURL = runtimeModel.target().inspectedURL();
|
1446
|
-
|
1447
|
-
const lines = string.split('\n');
|
1448
|
-
const linkInfos = [];
|
1449
|
-
for (const line of lines) {
|
1450
|
-
const isCallFrameLine = /^\s*at\s/.test(line);
|
1451
|
-
if (!isCallFrameLine && linkInfos.length && linkInfos[linkInfos.length - 1].link) {
|
1452
|
-
return null;
|
1453
|
-
}
|
1454
|
-
|
1455
|
-
if (!isCallFrameLine) {
|
1456
|
-
linkInfos.push({line});
|
1457
|
-
continue;
|
1458
|
-
}
|
1459
|
-
|
1460
|
-
let openBracketIndex = -1;
|
1461
|
-
let closeBracketIndex = -1;
|
1462
|
-
const inBracketsWithLineAndColumn = /\([^\)\(]+:\d+:\d+\)/g;
|
1463
|
-
const inBrackets = /\([^\)\(]+\)/g;
|
1464
|
-
let lastMatch: RegExpExecArray|null = null;
|
1465
|
-
let currentMatch;
|
1466
|
-
while ((currentMatch = inBracketsWithLineAndColumn.exec(line))) {
|
1467
|
-
lastMatch = currentMatch;
|
1468
|
-
}
|
1469
|
-
if (!lastMatch) {
|
1470
|
-
while ((currentMatch = inBrackets.exec(line))) {
|
1471
|
-
lastMatch = currentMatch;
|
1472
|
-
}
|
1473
|
-
}
|
1474
|
-
if (lastMatch) {
|
1475
|
-
openBracketIndex = lastMatch.index;
|
1476
|
-
closeBracketIndex = lastMatch.index + lastMatch[0].length - 1;
|
1477
|
-
}
|
1478
|
-
const hasOpenBracket = openBracketIndex !== -1;
|
1479
|
-
let left = hasOpenBracket ? openBracketIndex + 1 : line.indexOf('at') + 3;
|
1480
|
-
if (!hasOpenBracket && line.indexOf('async ') === left) {
|
1481
|
-
left += 6;
|
1482
|
-
}
|
1483
|
-
const right = hasOpenBracket ? closeBracketIndex : line.length;
|
1484
|
-
const linkCandidate = line.substring(left, right);
|
1485
|
-
const splitResult = Common.ParsedURL.ParsedURL.splitLineAndColumn(linkCandidate);
|
1486
|
-
if (!splitResult) {
|
1487
|
-
return null;
|
1488
|
-
}
|
1489
|
-
|
1490
|
-
if (splitResult.url === '<anonymous>') {
|
1491
|
-
linkInfos.push({line});
|
1492
|
-
continue;
|
1493
|
-
}
|
1494
|
-
let url = parseOrScriptMatch(splitResult.url);
|
1495
|
-
if (!url && Common.ParsedURL.ParsedURL.isRelativeURL(splitResult.url)) {
|
1496
|
-
url = parseOrScriptMatch(Common.ParsedURL.ParsedURL.completeURL(baseURL, splitResult.url));
|
1497
|
-
}
|
1498
|
-
if (!url) {
|
1499
|
-
return null;
|
1500
|
-
}
|
1501
|
-
|
1502
|
-
linkInfos.push({
|
1503
|
-
line,
|
1504
|
-
link: {
|
1505
|
-
url,
|
1506
|
-
enclosedInBraces: hasOpenBracket,
|
1507
|
-
positionLeft: left,
|
1508
|
-
positionRight: right,
|
1509
|
-
lineNumber: splitResult.lineNumber,
|
1510
|
-
columnNumber: splitResult.columnNumber,
|
1511
|
-
},
|
1512
|
-
});
|
1513
|
-
}
|
1514
1430
|
|
1515
|
-
|
1431
|
+
const linkInfos = parseSourcePositionsFromErrorStack(runtimeModel, string);
|
1432
|
+
if (!linkInfos?.length) {
|
1516
1433
|
return null;
|
1517
1434
|
}
|
1518
1435
|
|
1436
|
+
const debuggerModel = runtimeModel.debuggerModel();
|
1519
1437
|
const formattedResult = document.createElement('span');
|
1520
1438
|
for (let i = 0; i < linkInfos.length; ++i) {
|
1521
1439
|
const newline = i < linkInfos.length - 1 ? '\n' : '';
|
@@ -1565,25 +1483,6 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
1565
1483
|
}
|
1566
1484
|
|
1567
1485
|
return formattedResult;
|
1568
|
-
|
1569
|
-
function parseOrScriptMatch(url: string|null): string|null {
|
1570
|
-
if (!url) {
|
1571
|
-
return null;
|
1572
|
-
}
|
1573
|
-
const parsedURL = Common.ParsedURL.ParsedURL.fromString(url);
|
1574
|
-
if (parsedURL) {
|
1575
|
-
return parsedURL.url;
|
1576
|
-
}
|
1577
|
-
if (debuggerModel.scriptsForSourceURL(url).length) {
|
1578
|
-
return url;
|
1579
|
-
}
|
1580
|
-
// nodejs stack traces contain (absolute) file paths, but v8 reports them as file: urls.
|
1581
|
-
const fileUrl = new URL(url, 'file://');
|
1582
|
-
if (debuggerModel.scriptsForSourceURL(fileUrl.href).length) {
|
1583
|
-
return fileUrl.href;
|
1584
|
-
}
|
1585
|
-
return null;
|
1586
|
-
}
|
1587
1486
|
}
|
1588
1487
|
|
1589
1488
|
private linkifyWithCustomLinkifier(
|
@@ -0,0 +1,117 @@
|
|
1
|
+
// Copyright 2022 The Chromium Authors. All rights reserved.
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
3
|
+
// found in the LICENSE file.
|
4
|
+
|
5
|
+
import * as Common from '../../core/common/common.js';
|
6
|
+
import type * as SDK from '../../core/sdk/sdk.js';
|
7
|
+
|
8
|
+
export interface ParsedErrorFrame {
|
9
|
+
line: string;
|
10
|
+
link?: {
|
11
|
+
url: string,
|
12
|
+
lineNumber?: number,
|
13
|
+
columnNumber?: number, enclosedInBraces: boolean, positionLeft: number, positionRight: number,
|
14
|
+
};
|
15
|
+
}
|
16
|
+
|
17
|
+
/**
|
18
|
+
* Takes a V8 Error#stack string and extracts source position information.
|
19
|
+
*
|
20
|
+
* The result includes the url, line and column number, as well as where
|
21
|
+
* the url is found in the raw line.
|
22
|
+
*
|
23
|
+
* @returns Null if the provided string has an unexpected format. A
|
24
|
+
* populated `ParsedErrorFrame[]` otherwise.
|
25
|
+
*/
|
26
|
+
export function parseSourcePositionsFromErrorStack(
|
27
|
+
runtimeModel: SDK.RuntimeModel.RuntimeModel, stack: string): ParsedErrorFrame[]|null {
|
28
|
+
if (!/^[\w.]*Error\b/.test(stack)) {
|
29
|
+
return null;
|
30
|
+
}
|
31
|
+
const debuggerModel = runtimeModel.debuggerModel();
|
32
|
+
const baseURL = runtimeModel.target().inspectedURL();
|
33
|
+
|
34
|
+
const lines = stack.split('\n');
|
35
|
+
const linkInfos = [];
|
36
|
+
for (const line of lines) {
|
37
|
+
const isCallFrameLine = /^\s*at\s/.test(line);
|
38
|
+
if (!isCallFrameLine && linkInfos.length && linkInfos[linkInfos.length - 1].link) {
|
39
|
+
return null;
|
40
|
+
}
|
41
|
+
|
42
|
+
if (!isCallFrameLine) {
|
43
|
+
linkInfos.push({line});
|
44
|
+
continue;
|
45
|
+
}
|
46
|
+
|
47
|
+
let openBracketIndex = -1;
|
48
|
+
let closeBracketIndex = -1;
|
49
|
+
const inBracketsWithLineAndColumn = /\([^\)\(]+:\d+:\d+\)/g;
|
50
|
+
const inBrackets = /\([^\)\(]+\)/g;
|
51
|
+
let lastMatch: RegExpExecArray|null = null;
|
52
|
+
let currentMatch;
|
53
|
+
while ((currentMatch = inBracketsWithLineAndColumn.exec(line))) {
|
54
|
+
lastMatch = currentMatch;
|
55
|
+
}
|
56
|
+
if (!lastMatch) {
|
57
|
+
while ((currentMatch = inBrackets.exec(line))) {
|
58
|
+
lastMatch = currentMatch;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
if (lastMatch) {
|
62
|
+
openBracketIndex = lastMatch.index;
|
63
|
+
closeBracketIndex = lastMatch.index + lastMatch[0].length - 1;
|
64
|
+
}
|
65
|
+
const hasOpenBracket = openBracketIndex !== -1;
|
66
|
+
let left = hasOpenBracket ? openBracketIndex + 1 : line.indexOf('at') + 3;
|
67
|
+
if (!hasOpenBracket && line.indexOf('async ') === left) {
|
68
|
+
left += 6;
|
69
|
+
}
|
70
|
+
const right = hasOpenBracket ? closeBracketIndex : line.length;
|
71
|
+
const linkCandidate = line.substring(left, right);
|
72
|
+
const splitResult = Common.ParsedURL.ParsedURL.splitLineAndColumn(linkCandidate);
|
73
|
+
if (splitResult.url === '<anonymous>') {
|
74
|
+
linkInfos.push({line});
|
75
|
+
continue;
|
76
|
+
}
|
77
|
+
let url = parseOrScriptMatch(debuggerModel, splitResult.url);
|
78
|
+
if (!url && Common.ParsedURL.ParsedURL.isRelativeURL(splitResult.url)) {
|
79
|
+
url = parseOrScriptMatch(debuggerModel, Common.ParsedURL.ParsedURL.completeURL(baseURL, splitResult.url));
|
80
|
+
}
|
81
|
+
if (!url) {
|
82
|
+
return null;
|
83
|
+
}
|
84
|
+
|
85
|
+
linkInfos.push({
|
86
|
+
line,
|
87
|
+
link: {
|
88
|
+
url,
|
89
|
+
enclosedInBraces: hasOpenBracket,
|
90
|
+
positionLeft: left,
|
91
|
+
positionRight: right,
|
92
|
+
lineNumber: splitResult.lineNumber,
|
93
|
+
columnNumber: splitResult.columnNumber,
|
94
|
+
},
|
95
|
+
});
|
96
|
+
}
|
97
|
+
return linkInfos;
|
98
|
+
}
|
99
|
+
|
100
|
+
function parseOrScriptMatch(debuggerModel: SDK.DebuggerModel.DebuggerModel, url: string|null): string|null {
|
101
|
+
if (!url) {
|
102
|
+
return null;
|
103
|
+
}
|
104
|
+
const parsedURL = Common.ParsedURL.ParsedURL.fromString(url);
|
105
|
+
if (parsedURL) {
|
106
|
+
return parsedURL.url;
|
107
|
+
}
|
108
|
+
if (debuggerModel.scriptsForSourceURL(url).length) {
|
109
|
+
return url;
|
110
|
+
}
|
111
|
+
// nodejs stack traces contain (absolute) file paths, but v8 reports them as file: urls.
|
112
|
+
const fileUrl = new URL(url, 'file://');
|
113
|
+
if (debuggerModel.scriptsForSourceURL(fileUrl.href).length) {
|
114
|
+
return fileUrl.href;
|
115
|
+
}
|
116
|
+
return null;
|
117
|
+
}
|
@@ -23,6 +23,7 @@ import * as ConsoleSidebar from './ConsoleSidebar.js';
|
|
23
23
|
import * as ConsoleView from './ConsoleView.js';
|
24
24
|
import * as ConsoleViewMessage from './ConsoleViewMessage.js';
|
25
25
|
import * as ConsoleViewport from './ConsoleViewport.js';
|
26
|
+
import * as ErrorStackParser from './ErrorStackParser.js';
|
26
27
|
|
27
28
|
export {
|
28
29
|
ConsoleContextSelector,
|
@@ -35,4 +36,5 @@ export {
|
|
35
36
|
ConsoleView,
|
36
37
|
ConsoleViewMessage,
|
37
38
|
ConsoleViewport,
|
39
|
+
ErrorStackParser,
|
38
40
|
};
|
@@ -88,6 +88,14 @@ const UIStrings = {
|
|
88
88
|
* close/hide the sidebar.
|
89
89
|
*/
|
90
90
|
hideComputedStylesSidebar: 'Hide Computed Styles sidebar',
|
91
|
+
/**
|
92
|
+
* @description Screen reader announcement when the computed styles sidebar is shown in the Elements panel.
|
93
|
+
*/
|
94
|
+
computedStylesShown: 'Computed Styles sidebar shown',
|
95
|
+
/**
|
96
|
+
* @description Screen reader announcement when the computed styles sidebar is hidden in the Elements panel.
|
97
|
+
*/
|
98
|
+
computedStylesHidden: 'Computed Styles sidebar hidden',
|
91
99
|
/**
|
92
100
|
* @description Title of a pane in the Elements panel that shows computed styles for the selected
|
93
101
|
* HTML element. Computed styles are the final, actual styles of the element, including all
|
@@ -962,7 +970,8 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
962
970
|
});
|
963
971
|
this.stylesWidget.addEventListener(StylesSidebarPaneEvents.InitialUpdateCompleted, () => {
|
964
972
|
this.stylesWidget.appendToolbarItem(stylesSplitWidget.createShowHideSidebarButton(
|
965
|
-
i18nString(UIStrings.showComputedStylesSidebar), i18nString(UIStrings.hideComputedStylesSidebar)
|
973
|
+
i18nString(UIStrings.showComputedStylesSidebar), i18nString(UIStrings.hideComputedStylesSidebar),
|
974
|
+
i18nString(UIStrings.computedStylesShown), i18nString(UIStrings.computedStylesHidden)));
|
966
975
|
});
|
967
976
|
|
968
977
|
const showMetricsWidgetInComputedPane = (): void => {
|
@@ -63,6 +63,11 @@ export class SnippetsQuickOpen extends QuickOpen.FilteredListWidget.Provider {
|
|
63
63
|
this.snippets = [];
|
64
64
|
}
|
65
65
|
|
66
|
+
itemScoreAt(itemIndex: number, query: string): number {
|
67
|
+
// Prefer short matches over long matches
|
68
|
+
return query.length / this.snippets[itemIndex].name().length;
|
69
|
+
}
|
70
|
+
|
66
71
|
itemCount(): number {
|
67
72
|
return this.snippets.length;
|
68
73
|
}
|
@@ -206,7 +206,7 @@ export class BreakpointEditDialog extends UI.Widget.Widget {
|
|
206
206
|
}
|
207
207
|
}
|
208
208
|
|
209
|
-
|
209
|
+
finishEditing(committed: boolean, condition: string): void {
|
210
210
|
if (this.finished) {
|
211
211
|
return;
|
212
212
|
}
|
@@ -192,8 +192,8 @@ export class DebuggerPlugin extends Plugin {
|
|
192
192
|
private initializedMuted: boolean;
|
193
193
|
private ignoreListInfobar: UI.Infobar.Infobar|null;
|
194
194
|
private prettyPrintInfobar!: UI.Infobar.Infobar|null;
|
195
|
-
private scheduledBreakpointDecorationUpdates?: Set<BreakpointDecoration>|null;
|
196
195
|
private refreshBreakpointsTimeout: undefined|number = undefined;
|
196
|
+
private activeBreakpointDialog: BreakpointEditDialog|null = null;
|
197
197
|
|
198
198
|
constructor(
|
199
199
|
uiSourceCode: Workspace.UISourceCode.UISourceCode,
|
@@ -799,6 +799,7 @@ export class DebuggerPlugin extends Plugin {
|
|
799
799
|
const decorationElement = document.createElement('div');
|
800
800
|
const compartment = new CodeMirror.Compartment();
|
801
801
|
const dialog = new BreakpointEditDialog(line.number - 1, oldCondition, Boolean(preferLogpoint), async result => {
|
802
|
+
this.activeBreakpointDialog = null;
|
802
803
|
dialog.detach();
|
803
804
|
editor.dispatch({effects: compartment.reconfigure([])});
|
804
805
|
if (!result.committed) {
|
@@ -828,6 +829,7 @@ export class DebuggerPlugin extends Plugin {
|
|
828
829
|
dialog.markAsExternallyManaged();
|
829
830
|
dialog.show(decorationElement);
|
830
831
|
dialog.focusEditor();
|
832
|
+
this.activeBreakpointDialog = dialog;
|
831
833
|
}
|
832
834
|
|
833
835
|
// Create decorations to indicate the current debugging position
|
@@ -1423,6 +1425,10 @@ export class DebuggerPlugin extends Plugin {
|
|
1423
1425
|
if (this.muted) {
|
1424
1426
|
return;
|
1425
1427
|
}
|
1428
|
+
if (this.activeBreakpointDialog) {
|
1429
|
+
this.activeBreakpointDialog.finishEditing(false, '');
|
1430
|
+
}
|
1431
|
+
|
1426
1432
|
const breakpoints = this.lineBreakpoints(line);
|
1427
1433
|
if (!breakpoints.length) {
|
1428
1434
|
await this.createNewBreakpoint(line, '', true);
|
@@ -69,6 +69,22 @@ const UIStrings = {
|
|
69
69
|
* the sidebar containing the navigator tool.
|
70
70
|
*/
|
71
71
|
hideNavigator: 'Hide navigator',
|
72
|
+
/**
|
73
|
+
* @description Screen reader announcement when the navigator sidebar is shown in the Sources panel.
|
74
|
+
*/
|
75
|
+
navigatorShown: 'Navigator sidebar shown',
|
76
|
+
/**
|
77
|
+
* @description Screen reader announcement when the navigator sidebar is hidden in the Sources panel.
|
78
|
+
*/
|
79
|
+
navigatorHidden: 'Navigator sidebar hidden',
|
80
|
+
/**
|
81
|
+
* @description Screen reader announcement when the navigator sidebar is shown in the Sources panel.
|
82
|
+
*/
|
83
|
+
debuggerShown: 'Debugger sidebar shown',
|
84
|
+
/**
|
85
|
+
* @description Screen reader announcement when the navigator sidebar is hidden in the Sources panel.
|
86
|
+
*/
|
87
|
+
debuggerHidden: 'Debugger sidebar hidden',
|
72
88
|
/**
|
73
89
|
* @description Tooltip for the the debugger toggle in the Sources panel. Command to open/show the
|
74
90
|
* sidebar containing the debugger tool.
|
@@ -252,9 +268,11 @@ export class SourcesPanel extends UI.Panel.Panel implements UI.ContextMenu.Provi
|
|
252
268
|
this.sourcesViewInternal.addEventListener(Events.EditorSelected, this.editorSelected.bind(this));
|
253
269
|
|
254
270
|
this.toggleNavigatorSidebarButton = this.editorView.createShowHideSidebarButton(
|
255
|
-
i18nString(UIStrings.showNavigator), i18nString(UIStrings.hideNavigator))
|
271
|
+
i18nString(UIStrings.showNavigator), i18nString(UIStrings.hideNavigator), i18nString(UIStrings.navigatorShown),
|
272
|
+
i18nString(UIStrings.navigatorHidden));
|
256
273
|
this.toggleDebuggerSidebarButton = this.splitWidget.createShowHideSidebarButton(
|
257
|
-
i18nString(UIStrings.showDebugger), i18nString(UIStrings.hideDebugger))
|
274
|
+
i18nString(UIStrings.showDebugger), i18nString(UIStrings.hideDebugger), i18nString(UIStrings.debuggerShown),
|
275
|
+
i18nString(UIStrings.debuggerHidden));
|
258
276
|
this.editorView.setMainWidget(this.sourcesViewInternal);
|
259
277
|
|
260
278
|
this.threadsSidebarPane = null;
|
@@ -137,6 +137,14 @@ const UIStrings = {
|
|
137
137
|
* Performance panel. Command to close/hide the sidebar.
|
138
138
|
*/
|
139
139
|
hideHeaviestStack: 'Hide Heaviest stack',
|
140
|
+
/**
|
141
|
+
* @description Screen reader announcement when the heaviest stack sidebar is shown in the Performance panel.
|
142
|
+
*/
|
143
|
+
heaviestStackShown: 'Heaviest stack sidebar shown',
|
144
|
+
/**
|
145
|
+
* @description Screen reader announcement when the heaviest stack sidebar is hidden in the Performance panel.
|
146
|
+
*/
|
147
|
+
heaviestStackHidden: 'Heaviest stack sidebar hidden',
|
140
148
|
/**
|
141
149
|
*@description Data grid name for Timeline Stack data grids
|
142
150
|
*/
|
@@ -832,7 +840,8 @@ export class AggregatedTimelineTreeView extends TimelineTreeView {
|
|
832
840
|
new UI.Toolbar.ToolbarSettingComboBox(options, this.groupBySetting, i18nString(UIStrings.groupBy)));
|
833
841
|
toolbar.appendSpacer();
|
834
842
|
toolbar.appendToolbarItem(this.splitWidget.createShowHideSidebarButton(
|
835
|
-
i18nString(UIStrings.showHeaviestStack), i18nString(UIStrings.hideHeaviestStack)
|
843
|
+
i18nString(UIStrings.showHeaviestStack), i18nString(UIStrings.hideHeaviestStack),
|
844
|
+
i18nString(UIStrings.heaviestStackShown), i18nString(UIStrings.heaviestStackHidden)));
|
836
845
|
}
|
837
846
|
|
838
847
|
private buildHeaviestStack(treeNode: TimelineModel.TimelineProfileTree.Node):
|
@@ -1,9 +1,9 @@
|
|
1
|
-
Name:
|
1
|
+
Name: Acorn-loose
|
2
2
|
Short Name: acorn-loose
|
3
3
|
URL: https://github.com/acornjs/acorn
|
4
4
|
Version: 8.2.1
|
5
5
|
License: MIT
|
6
|
-
License File: LICENSE
|
6
|
+
License File: package/LICENSE
|
7
7
|
Security Critical: no
|
8
8
|
|
9
9
|
Description:
|
@@ -1,9 +1,9 @@
|
|
1
|
-
Name: CodeMirror
|
1
|
+
Name: CodeMirror 5
|
2
2
|
Short Name: CodeMirror
|
3
3
|
URL: https://github.com/codemirror/CodeMirror/
|
4
4
|
Version: 5.61.0
|
5
5
|
License: MIT
|
6
|
-
License File: LICENSE
|
6
|
+
License File: package/LICENSE
|
7
7
|
Security Critical: no
|
8
8
|
|
9
9
|
Description:
|
@@ -1,9 +1,9 @@
|
|
1
|
-
Name:
|
1
|
+
Name: Lit-HTML
|
2
2
|
Short Name: lit-html
|
3
3
|
URL: https://github.com/polymer/lit-html
|
4
4
|
Version: 2.0.2
|
5
5
|
License: BSD-3
|
6
|
-
License File: LICENSE
|
6
|
+
License File: package/LICENSE
|
7
7
|
Security Critical: no
|
8
8
|
|
9
9
|
Description:
|
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
<img src="https://user-images.githubusercontent.com/10379601/29446482-04f7036a-841f-11e7-9872-91d1fc2ea683.png" height="200" align="right">
|
10
10
|
|
11
|
-
###### [API](https://github.com/puppeteer/puppeteer/blob/v13.
|
11
|
+
###### [API](https://github.com/puppeteer/puppeteer/blob/v13.1.1/docs/api.md) | [FAQ](#faq) | [Contributing](https://github.com/puppeteer/puppeteer/blob/main/CONTRIBUTING.md) | [Troubleshooting](https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md)
|
12
12
|
|
13
13
|
> Puppeteer is a Node library which provides a high-level API to control Chrome or Chromium over the [DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/). Puppeteer runs [headless](https://developers.google.com/web/updates/2017/04/headless-chrome) by default, but can be configured to run full (non-headless) Chrome or Chromium.
|
14
14
|
|
@@ -39,7 +39,7 @@ npm i puppeteer
|
|
39
39
|
# or "yarn add puppeteer"
|
40
40
|
```
|
41
41
|
|
42
|
-
Note: When you install Puppeteer, it downloads a recent version of Chromium (~170MB Mac, ~282MB Linux, ~280MB Win) that is guaranteed to work with the API. To skip the download, download into another path, or download a different browser, see [Environment variables](https://github.com/puppeteer/puppeteer/blob/v13.
|
42
|
+
Note: When you install Puppeteer, it downloads a recent version of Chromium (~170MB Mac, ~282MB Linux, ~280MB Win) that is guaranteed to work with the API. To skip the download, download into another path, or download a different browser, see [Environment variables](https://github.com/puppeteer/puppeteer/blob/v13.1.1/docs/api.md#environment-variables).
|
43
43
|
|
44
44
|
### puppeteer-core
|
45
45
|
|
@@ -64,7 +64,7 @@ Note: Prior to v1.18.1, Puppeteer required at least Node v6.4.0. Versions from v
|
|
64
64
|
Node 8.9.0+. Starting from v3.0.0 Puppeteer starts to rely on Node 10.18.1+. All examples below use async/await which is only supported in Node v7.6.0 or greater.
|
65
65
|
|
66
66
|
Puppeteer will be familiar to people using other browser testing frameworks. You create an instance
|
67
|
-
of `Browser`, open pages, and then manipulate them with [Puppeteer's API](https://github.com/puppeteer/puppeteer/blob/v13.
|
67
|
+
of `Browser`, open pages, and then manipulate them with [Puppeteer's API](https://github.com/puppeteer/puppeteer/blob/v13.1.1/docs/api.md#).
|
68
68
|
|
69
69
|
**Example** - navigating to https://example.com and saving a screenshot as _example.png_:
|
70
70
|
|
@@ -89,7 +89,7 @@ Execute script on the command line
|
|
89
89
|
node example.js
|
90
90
|
```
|
91
91
|
|
92
|
-
Puppeteer sets an initial page size to 800×600px, which defines the screenshot size. The page size can be customized with [`Page.setViewport()`](https://github.com/puppeteer/puppeteer/blob/v13.
|
92
|
+
Puppeteer sets an initial page size to 800×600px, which defines the screenshot size. The page size can be customized with [`Page.setViewport()`](https://github.com/puppeteer/puppeteer/blob/v13.1.1/docs/api.md#pagesetviewportviewport).
|
93
93
|
|
94
94
|
**Example** - create a PDF.
|
95
95
|
|
@@ -116,7 +116,7 @@ Execute script on the command line
|
|
116
116
|
node hn.js
|
117
117
|
```
|
118
118
|
|
119
|
-
See [`Page.pdf()`](https://github.com/puppeteer/puppeteer/blob/v13.
|
119
|
+
See [`Page.pdf()`](https://github.com/puppeteer/puppeteer/blob/v13.1.1/docs/api.md#pagepdfoptions) for more information about creating pdfs.
|
120
120
|
|
121
121
|
**Example** - evaluate script in the context of the page
|
122
122
|
|
@@ -151,7 +151,7 @@ Execute script on the command line
|
|
151
151
|
node get-dimensions.js
|
152
152
|
```
|
153
153
|
|
154
|
-
See [`Page.evaluate()`](https://github.com/puppeteer/puppeteer/blob/v13.
|
154
|
+
See [`Page.evaluate()`](https://github.com/puppeteer/puppeteer/blob/v13.1.1/docs/api.md#pageevaluatepagefunction-args) for more information on `evaluate` and related methods like `evaluateOnNewDocument` and `exposeFunction`.
|
155
155
|
|
156
156
|
<!-- [END getstarted] -->
|
157
157
|
|
@@ -161,7 +161,7 @@ See [`Page.evaluate()`](https://github.com/puppeteer/puppeteer/blob/v13.0.1/docs
|
|
161
161
|
|
162
162
|
**1. Uses Headless mode**
|
163
163
|
|
164
|
-
Puppeteer launches Chromium in [headless mode](https://developers.google.com/web/updates/2017/04/headless-chrome). To launch a full version of Chromium, set the [`headless` option](https://github.com/puppeteer/puppeteer/blob/v13.
|
164
|
+
Puppeteer launches Chromium in [headless mode](https://developers.google.com/web/updates/2017/04/headless-chrome). To launch a full version of Chromium, set the [`headless` option](https://github.com/puppeteer/puppeteer/blob/v13.1.1/docs/api.md#puppeteerlaunchoptions) when launching a browser:
|
165
165
|
|
166
166
|
```js
|
167
167
|
const browser = await puppeteer.launch({ headless: false }); // default is true
|
@@ -177,7 +177,7 @@ pass in the executable's path when creating a `Browser` instance:
|
|
177
177
|
const browser = await puppeteer.launch({ executablePath: '/path/to/Chrome' });
|
178
178
|
```
|
179
179
|
|
180
|
-
You can also use Puppeteer with Firefox Nightly (experimental support). See [`Puppeteer.launch()`](https://github.com/puppeteer/puppeteer/blob/v13.
|
180
|
+
You can also use Puppeteer with Firefox Nightly (experimental support). See [`Puppeteer.launch()`](https://github.com/puppeteer/puppeteer/blob/v13.1.1/docs/api.md#puppeteerlaunchoptions) for more information.
|
181
181
|
|
182
182
|
See [`this article`](https://www.howtogeek.com/202825/what%E2%80%99s-the-difference-between-chromium-and-chrome/) for a description of the differences between Chromium and Chrome. [`This article`](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/chromium_browser_vs_google_chrome.md) describes some differences for Linux users.
|
183
183
|
|
@@ -189,7 +189,7 @@ Puppeteer creates its own browser user profile which it **cleans up on every run
|
|
189
189
|
|
190
190
|
## Resources
|
191
191
|
|
192
|
-
- [API Documentation](https://github.com/puppeteer/puppeteer/blob/v13.
|
192
|
+
- [API Documentation](https://github.com/puppeteer/puppeteer/blob/v13.1.1/docs/api.md)
|
193
193
|
- [Examples](https://github.com/puppeteer/puppeteer/tree/main/examples/)
|
194
194
|
- [Community list of Puppeteer resources](https://github.com/transitive-bullshit/awesome-puppeteer)
|
195
195
|
|
@@ -331,7 +331,7 @@ See [Contributing](https://github.com/puppeteer/puppeteer/blob/main/CONTRIBUTING
|
|
331
331
|
|
332
332
|
Official Firefox support is currently experimental. The ongoing collaboration with Mozilla aims to support common end-to-end testing use cases, for which developers expect cross-browser coverage. The Puppeteer team needs input from users to stabilize Firefox support and to bring missing APIs to our attention.
|
333
333
|
|
334
|
-
From Puppeteer v2.1.0 onwards you can specify [`puppeteer.launch({product: 'firefox'})`](https://github.com/puppeteer/puppeteer/blob/v13.
|
334
|
+
From Puppeteer v2.1.0 onwards you can specify [`puppeteer.launch({product: 'firefox'})`](https://github.com/puppeteer/puppeteer/blob/v13.1.1/docs/api.md#puppeteerlaunchoptions) to run your Puppeteer scripts in Firefox Nightly, without any additional custom patches. While [an older experiment](https://www.npmjs.com/package/puppeteer-firefox) required a patched version of Firefox, [the current approach](https://wiki.mozilla.org/Remote) works with “stock” Firefox.
|
335
335
|
|
336
336
|
We will continue to collaborate with other browser vendors to bring Puppeteer support to browsers such as Safari.
|
337
337
|
This effort includes exploration of a standard for executing cross-browser commands (instead of relying on the non-standard DevTools Protocol used by Chrome).
|
@@ -431,7 +431,7 @@ await page.evaluate(() => {
|
|
431
431
|
|
432
432
|
You may find that Puppeteer does not behave as expected when controlling pages that incorporate audio and video. (For example, [video playback/screenshots is likely to fail](https://github.com/puppeteer/puppeteer/issues/291).) There are two reasons for this:
|
433
433
|
|
434
|
-
- Puppeteer is bundled with Chromium — not Chrome — and so by default, it inherits all of [Chromium's media-related limitations](https://www.chromium.org/audio-video). This means that Puppeteer does not support licensed formats such as AAC or H.264. (However, it is possible to force Puppeteer to use a separately-installed version Chrome instead of Chromium via the [`executablePath` option to `puppeteer.launch`](https://github.com/puppeteer/puppeteer/blob/v13.
|
434
|
+
- Puppeteer is bundled with Chromium — not Chrome — and so by default, it inherits all of [Chromium's media-related limitations](https://www.chromium.org/audio-video). This means that Puppeteer does not support licensed formats such as AAC or H.264. (However, it is possible to force Puppeteer to use a separately-installed version Chrome instead of Chromium via the [`executablePath` option to `puppeteer.launch`](https://github.com/puppeteer/puppeteer/blob/v13.1.1/docs/api.md#puppeteerlaunchoptions). You should only use this configuration if you need an official release of Chrome that supports these media formats.)
|
435
435
|
- Since Puppeteer (in all configurations) controls a desktop version of Chromium/Chrome, features that are only supported by the mobile version of Chrome are not supported. This means that Puppeteer [does not support HTTP Live Streaming (HLS)](https://caniuse.com/#feat=http-live-streaming).
|
436
436
|
|
437
437
|
#### Q: I am having trouble installing / running Puppeteer in my test environment. Where should I look for help?
|
@@ -53,7 +53,6 @@ export declare class FrameManager extends EventEmitter {
|
|
53
53
|
private _contextIdToContext;
|
54
54
|
private _isolatedWorlds;
|
55
55
|
private _mainFrame;
|
56
|
-
private _disconnectPromise?;
|
57
56
|
constructor(client: CDPSession, page: Page, ignoreHTTPSErrors: boolean, timeoutSettings: TimeoutSettings);
|
58
57
|
private setupEventListeners;
|
59
58
|
initialize(client?: CDPSession): Promise<void>;
|