chrome-devtools-frontend 1.0.945329 → 1.0.945579

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.
Files changed (45) hide show
  1. package/config/gni/devtools_grd_files.gni +1 -0
  2. package/config/gni/devtools_image_files.gni +1 -0
  3. package/front_end/Images/src/circled_exclamation_icon.svg +3 -0
  4. package/front_end/core/sdk/CSSMetadata.ts +0 -1
  5. package/front_end/generated/protocol.d.ts +0 -4
  6. package/front_end/models/emulation/EmulatedDevices.ts +2 -4
  7. package/front_end/panels/application/BackForwardCacheView.ts +8 -1
  8. package/front_end/panels/elements/StyleEditorWidget.ts +13 -2
  9. package/front_end/panels/elements/StylePropertyTreeElement.ts +8 -12
  10. package/front_end/panels/elements/StylesSidebarPane.ts +35 -9
  11. package/front_end/ui/components/adorners/Adorner.ts +14 -14
  12. package/front_end/ui/components/buttons/Button.ts +116 -42
  13. package/front_end/ui/components/data_grid/DataGrid.ts +122 -122
  14. package/front_end/ui/components/data_grid/DataGridController.ts +42 -42
  15. package/front_end/ui/components/diff_view/DiffView.ts +4 -4
  16. package/front_end/ui/components/docs/button/basic.html +3 -0
  17. package/front_end/ui/components/docs/button/basic.ts +16 -0
  18. package/front_end/ui/components/expandable_list/ExpandableList.ts +11 -11
  19. package/front_end/ui/components/icon_button/Icon.ts +24 -21
  20. package/front_end/ui/components/icon_button/IconButton.ts +31 -31
  21. package/front_end/ui/components/issue_counter/IssueCounter.ts +52 -52
  22. package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +42 -42
  23. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +67 -67
  24. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +22 -22
  25. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +36 -36
  26. package/front_end/ui/components/linear_memory_inspector/LinearMemoryNavigator.ts +19 -19
  27. package/front_end/ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts +25 -25
  28. package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +52 -52
  29. package/front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts +21 -21
  30. package/front_end/ui/components/linear_memory_inspector/ValueInterpreterSettings.ts +6 -6
  31. package/front_end/ui/components/markdown_view/MarkdownImage.ts +14 -14
  32. package/front_end/ui/components/markdown_view/MarkdownLink.ts +8 -8
  33. package/front_end/ui/components/markdown_view/MarkdownView.ts +6 -6
  34. package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +33 -33
  35. package/front_end/ui/components/report_view/ReportView.ts +18 -18
  36. package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +53 -53
  37. package/front_end/ui/components/settings/SettingCheckbox.ts +15 -15
  38. package/front_end/ui/components/survey_link/SurveyLink.ts +28 -28
  39. package/front_end/ui/components/text_editor/TextEditor.ts +51 -51
  40. package/front_end/ui/components/text_editor/javascript.ts +6 -6
  41. package/front_end/ui/components/text_prompt/TextPrompt.ts +19 -19
  42. package/front_end/ui/components/tree_outline/TreeOutline.ts +56 -56
  43. package/front_end/ui/legacy/Infobar.ts +9 -0
  44. package/front_end/ui/legacy/tabbedPane.css +1 -1
  45. package/package.json +1 -1
@@ -76,34 +76,34 @@ export class JumpToPointerAddressEvent extends Event {
76
76
  export class ValueInterpreterDisplay extends HTMLElement {
77
77
  static readonly litTagName = LitHtml.literal`devtools-linear-memory-inspector-interpreter-display`;
78
78
 
79
- private readonly shadow = this.attachShadow({mode: 'open'});
80
- private endianness = Endianness.Little;
81
- private buffer = new ArrayBuffer(0);
82
- private valueTypes: Set<ValueType> = new Set();
83
- private valueTypeModeConfig: Map<ValueType, ValueTypeMode> = getDefaultValueTypeMapping();
84
- private memoryLength = 0;
79
+ readonly #shadow = this.attachShadow({mode: 'open'});
80
+ #endianness = Endianness.Little;
81
+ #buffer = new ArrayBuffer(0);
82
+ #valueTypes: Set<ValueType> = new Set();
83
+ #valueTypeModeConfig: Map<ValueType, ValueTypeMode> = getDefaultValueTypeMapping();
84
+ #memoryLength = 0;
85
85
 
86
86
  constructor() {
87
87
  super();
88
- this.shadow.adoptedStyleSheets = [
88
+ this.#shadow.adoptedStyleSheets = [
89
89
  inspectorCommonStyles,
90
90
  ];
91
91
  }
92
92
 
93
93
  connectedCallback(): void {
94
- this.shadow.adoptedStyleSheets = [valueInterpreterDisplayStyles];
94
+ this.#shadow.adoptedStyleSheets = [valueInterpreterDisplayStyles];
95
95
  }
96
96
 
97
97
  set data(data: ValueDisplayData) {
98
- this.buffer = data.buffer;
99
- this.endianness = data.endianness;
100
- this.valueTypes = data.valueTypes;
101
- this.memoryLength = data.memoryLength;
98
+ this.#buffer = data.buffer;
99
+ this.#endianness = data.endianness;
100
+ this.#valueTypes = data.valueTypes;
101
+ this.#memoryLength = data.memoryLength;
102
102
 
103
103
  if (data.valueTypeModes) {
104
104
  data.valueTypeModes.forEach((mode, valueType) => {
105
105
  if (isValidMode(valueType, mode)) {
106
- this.valueTypeModeConfig.set(valueType, mode);
106
+ this.#valueTypeModeConfig.set(valueType, mode);
107
107
  }
108
108
  });
109
109
  }
@@ -116,9 +116,9 @@ export class ValueInterpreterDisplay extends HTMLElement {
116
116
  // clang-format off
117
117
  render(html`
118
118
  <div class="value-types">
119
- ${SORTED_VALUE_TYPES.map(type => this.valueTypes.has(type) ? this.showValue(type) : '')}
119
+ ${SORTED_VALUE_TYPES.map(type => this.#valueTypes.has(type) ? this.showValue(type) : '')}
120
120
  </div>
121
- `, this.shadow, {host: this},
121
+ `, this.#shadow, {host: this},
122
122
  );
123
123
  // clang-format on
124
124
  }
@@ -135,8 +135,8 @@ export class ValueInterpreterDisplay extends HTMLElement {
135
135
 
136
136
  private renderPointerValue(type: ValueType): LitHtml.TemplateResult {
137
137
  const unsignedValue = this.parse({type, signed: false});
138
- const address = getPointerAddress(type, this.buffer, this.endianness);
139
- const jumpDisabled = Number.isNaN(address) || BigInt(address) >= BigInt(this.memoryLength);
138
+ const address = getPointerAddress(type, this.#buffer, this.#endianness);
139
+ const jumpDisabled = Number.isNaN(address) || BigInt(address) >= BigInt(this.#memoryLength);
140
140
  const buttonTitle = jumpDisabled ? i18nString(UIStrings.addressOutOfRange) : i18nString(UIStrings.jumpToPointer);
141
141
  const iconColor = jumpDisabled ? 'var(--color-text-secondary)' : 'var(--color-primary)';
142
142
  // Disabled until https://crbug.com/1079231 is fixed.
@@ -177,7 +177,7 @@ export class ValueInterpreterDisplay extends HTMLElement {
177
177
  @change=${this.onValueTypeModeChange.bind(this, type)}>
178
178
  ${VALUE_TYPE_MODE_LIST.filter(x => isValidMode(type, x)).map(mode => {
179
179
  return html`
180
- <option value=${mode} .selected=${this.valueTypeModeConfig.get(type) === mode}>${
180
+ <option value=${mode} .selected=${this.#valueTypeModeConfig.get(type) === mode}>${
181
181
  i18n.i18n.lockedString(mode)}
182
182
  </option>`;
183
183
  })}
@@ -191,7 +191,7 @@ export class ValueInterpreterDisplay extends HTMLElement {
191
191
  private renderSignedAndUnsigned(type: ValueType): LitHtml.TemplateResult {
192
192
  const unsignedValue = this.parse({type, signed: false});
193
193
  const signedValue = this.parse({type, signed: true});
194
- const mode = this.valueTypeModeConfig.get(type);
194
+ const mode = this.#valueTypeModeConfig.get(type);
195
195
  const showSignedAndUnsigned =
196
196
  signedValue !== unsignedValue && mode !== ValueTypeMode.Hexadecimal && mode !== ValueTypeMode.Octal;
197
197
 
@@ -232,9 +232,9 @@ export class ValueInterpreterDisplay extends HTMLElement {
232
232
  }
233
233
 
234
234
  private parse(data: {type: ValueType, signed?: boolean}): string {
235
- const mode = this.valueTypeModeConfig.get(data.type);
235
+ const mode = this.#valueTypeModeConfig.get(data.type);
236
236
  return format(
237
- {buffer: this.buffer, type: data.type, endianness: this.endianness, signed: data.signed || false, mode});
237
+ {buffer: this.#buffer, type: data.type, endianness: this.#endianness, signed: data.signed || false, mode});
238
238
  }
239
239
  }
240
240
 
@@ -61,15 +61,15 @@ export class TypeToggleEvent extends Event {
61
61
  export class ValueInterpreterSettings extends HTMLElement {
62
62
  static readonly litTagName = LitHtml.literal`devtools-linear-memory-inspector-interpreter-settings`;
63
63
 
64
- private readonly shadow = this.attachShadow({mode: 'open'});
65
- private valueTypes: Set<ValueType> = new Set();
64
+ readonly #shadow = this.attachShadow({mode: 'open'});
65
+ #valueTypes: Set<ValueType> = new Set();
66
66
 
67
67
  connectedCallback(): void {
68
- this.shadow.adoptedStyleSheets = [valueInterpreterSettingsStyles];
68
+ this.#shadow.adoptedStyleSheets = [valueInterpreterSettingsStyles];
69
69
  }
70
70
 
71
71
  set data(data: ValueInterpreterSettingsData) {
72
- this.valueTypes = data.valueTypes;
72
+ this.#valueTypes = data.valueTypes;
73
73
  this.render();
74
74
  }
75
75
 
@@ -86,7 +86,7 @@ export class ValueInterpreterSettings extends HTMLElement {
86
86
  </div>
87
87
  `;})}
88
88
  </div>
89
- `, this.shadow, {host: this});
89
+ `, this.#shadow, {host: this});
90
90
  }
91
91
 
92
92
  private plotTypeSelections(group: ValueTypeGroup): LitHtml.TemplateResult {
@@ -98,7 +98,7 @@ export class ValueInterpreterSettings extends HTMLElement {
98
98
  ${types.map(type => {
99
99
  return html`
100
100
  <label class="type-label" title=${valueTypeToLocalizedString(type)}>
101
- <input data-input="true" type="checkbox" .checked=${this.valueTypes.has(type)} @change=${(e: Event): void => this.onTypeToggle(type, e)}>
101
+ <input data-input="true" type="checkbox" .checked=${this.#valueTypes.has(type)} @change=${(e: Event): void => this.onTypeToggle(type, e)}>
102
102
  <span data-title="true">${valueTypeToLocalizedString(type)}</span>
103
103
  </label>
104
104
  `;})}`;
@@ -23,31 +23,31 @@ export interface MarkdownImageData {
23
23
  export class MarkdownImage extends HTMLElement {
24
24
  static readonly litTagName = LitHtml.literal`devtools-markdown-image`;
25
25
 
26
- private readonly shadow = this.attachShadow({mode: 'open'});
27
- private imageData?: ImageData;
28
- private imageTitle?: string;
26
+ readonly #shadow = this.attachShadow({mode: 'open'});
27
+ #imageData?: ImageData;
28
+ #imageTitle?: string;
29
29
 
30
30
  constructor() {
31
31
  super();
32
32
  }
33
33
 
34
34
  connectedCallback(): void {
35
- this.shadow.adoptedStyleSheets = [markdownImageStyles];
35
+ this.#shadow.adoptedStyleSheets = [markdownImageStyles];
36
36
  }
37
37
 
38
38
  set data(data: MarkdownImageData) {
39
39
  const {key, title} = data;
40
40
  const markdownImage = getMarkdownImage(key);
41
- this.imageData = markdownImage;
42
- this.imageTitle = title;
41
+ this.#imageData = markdownImage;
42
+ this.#imageTitle = title;
43
43
  this.render();
44
44
  }
45
45
 
46
46
  private getIconComponent(): LitHtml.TemplateResult {
47
- if (!this.imageData) {
47
+ if (!this.#imageData) {
48
48
  return LitHtml.html``;
49
49
  }
50
- const {src, color, width = '100%', height = '100%'} = this.imageData;
50
+ const {src, color, width = '100%', height = '100%'} = this.#imageData;
51
51
  return LitHtml.html`
52
52
  <${IconButton.Icon.Icon.litTagName} .data=${
53
53
  {iconPath: src, color, width, height} as IconButton.Icon.IconData}></${IconButton.Icon.Icon.litTagName}>
@@ -55,22 +55,22 @@ export class MarkdownImage extends HTMLElement {
55
55
  }
56
56
 
57
57
  private getImageComponent(): LitHtml.TemplateResult {
58
- if (!this.imageData) {
58
+ if (!this.#imageData) {
59
59
  return LitHtml.html``;
60
60
  }
61
- const {src, width = '100%', height = '100%'} = this.imageData;
61
+ const {src, width = '100%', height = '100%'} = this.#imageData;
62
62
  return LitHtml.html`
63
- <img class="markdown-image" src=${src} alt=${this.imageTitle} width=${width} height=${height}/>
63
+ <img class="markdown-image" src=${src} alt=${this.#imageTitle} width=${width} height=${height}/>
64
64
  `;
65
65
  }
66
66
 
67
67
  private render(): void {
68
- if (!this.imageData) {
68
+ if (!this.#imageData) {
69
69
  return;
70
70
  }
71
- const {isIcon} = this.imageData;
71
+ const {isIcon} = this.#imageData;
72
72
  const imageComponent = isIcon ? this.getIconComponent() : this.getImageComponent();
73
- LitHtml.render(imageComponent, this.shadow, {host: this});
73
+ LitHtml.render(imageComponent, this.#shadow, {host: this});
74
74
  }
75
75
  }
76
76
 
@@ -23,28 +23,28 @@ export interface MarkdownLinkData {
23
23
  export class MarkdownLink extends HTMLElement {
24
24
  static readonly litTagName = LitHtml.literal`devtools-markdown-link`;
25
25
 
26
- private readonly shadow = this.attachShadow({mode: 'open'});
27
- private linkText: string = '';
28
- private linkUrl: string = '';
26
+ readonly #shadow = this.attachShadow({mode: 'open'});
27
+ #linkText: string = '';
28
+ #linkUrl: string = '';
29
29
 
30
30
  connectedCallback(): void {
31
- this.shadow.adoptedStyleSheets = [markdownLinkStyles];
31
+ this.#shadow.adoptedStyleSheets = [markdownLinkStyles];
32
32
  }
33
33
 
34
34
  set data(data: MarkdownLinkData) {
35
35
  const {key, title} = data;
36
36
  const markdownLink = getMarkdownLink(key);
37
- this.linkText = title;
38
- this.linkUrl = markdownLink;
37
+ this.#linkText = title;
38
+ this.#linkUrl = markdownLink;
39
39
  this.render();
40
40
  }
41
41
 
42
42
  private render(): void {
43
43
  // clang-format off
44
44
  const output = LitHtml.html`
45
- <x-link class="devtools-link" href=${this.linkUrl}>${this.linkText}</x-link>
45
+ <x-link class="devtools-link" href=${this.#linkUrl}>${this.#linkText}</x-link>
46
46
  `;
47
- LitHtml.render(output, this.shadow, {host: this});
47
+ LitHtml.render(output, this.#shadow, {host: this});
48
48
  // clang-format on
49
49
  }
50
50
  }
@@ -21,17 +21,17 @@ export interface MarkdownViewData {
21
21
 
22
22
  export class MarkdownView extends HTMLElement {
23
23
  static readonly litTagName = LitHtml.literal`devtools-markdown-view`;
24
- private readonly shadow = this.attachShadow({mode: 'open'});
24
+ readonly #shadow = this.attachShadow({mode: 'open'});
25
25
 
26
26
  // TODO(crbug.com/1108699): Replace with `Marked.Marked.Token[]` once AST types are fixed upstream.
27
- private tokenData: readonly Object[] = [];
27
+ #tokenData: readonly Object[] = [];
28
28
 
29
29
  connectedCallback(): void {
30
- this.shadow.adoptedStyleSheets = [markdownViewStyles];
30
+ this.#shadow.adoptedStyleSheets = [markdownViewStyles];
31
31
  }
32
32
 
33
33
  set data(data: MarkdownViewData) {
34
- this.tokenData = data.tokens;
34
+ this.#tokenData = data.tokens;
35
35
  this.update();
36
36
  }
37
37
 
@@ -44,9 +44,9 @@ export class MarkdownView extends HTMLElement {
44
44
  // clang-format off
45
45
  render(html`
46
46
  <div class='message'>
47
- ${this.tokenData.map(renderToken)}
47
+ ${this.#tokenData.map(renderToken)}
48
48
  </div>
49
- `, this.shadow);
49
+ `, this.#shadow);
50
50
  // clang-format on
51
51
  }
52
52
  }
@@ -90,20 +90,20 @@ export class RenderCoordinator extends EventTarget {
90
90
  // This does not affect logging frames or queue empty events.
91
91
  observeOnlyNamed = true;
92
92
 
93
- private readonly logInternal: CoordinatorLogEntry[] = [];
93
+ readonly #logInternal: CoordinatorLogEntry[] = [];
94
94
 
95
- private readonly pendingWorkFrames: CoordinatorFrame[] = [];
96
- private readonly resolvers = new WeakMap<CoordinatorCallback, RenderCoordinatorResolverCallback>();
97
- private readonly rejectors = new WeakMap<CoordinatorCallback, RenderCoordinatorRejectorCallback>();
98
- private readonly labels = new WeakMap<CoordinatorCallback, string>();
99
- private scheduledWorkId = 0;
95
+ readonly #pendingWorkFrames: CoordinatorFrame[] = [];
96
+ readonly #resolvers = new WeakMap<CoordinatorCallback, RenderCoordinatorResolverCallback>();
97
+ readonly #rejectors = new WeakMap<CoordinatorCallback, RenderCoordinatorRejectorCallback>();
98
+ readonly #labels = new WeakMap<CoordinatorCallback, string>();
99
+ #scheduledWorkId = 0;
100
100
 
101
101
  pendingFramesCount(): number {
102
- return this.pendingWorkFrames.length;
102
+ return this.#pendingWorkFrames.length;
103
103
  }
104
104
 
105
105
  done(): Promise<void> {
106
- if (this.pendingWorkFrames.length === 0) {
106
+ if (this.#pendingWorkFrames.length === 0) {
107
107
  this.logIfEnabled('[Queue empty]');
108
108
  return Promise.resolve();
109
109
  }
@@ -139,8 +139,8 @@ export class RenderCoordinator extends EventTarget {
139
139
  }
140
140
 
141
141
  takeRecords(): CoordinatorLogEntry[] {
142
- const logs = [...this.logInternal];
143
- this.logInternal.length = 0;
142
+ const logs = [...this.#logInternal];
143
+ this.#logInternal.length = 0;
144
144
  return logs;
145
145
  }
146
146
 
@@ -165,16 +165,16 @@ export class RenderCoordinator extends EventTarget {
165
165
  }
166
166
 
167
167
  private enqueueHandler<T = unknown>(callback: CoordinatorCallback, action: ACTION, label = ''): Promise<T> {
168
- this.labels.set(callback, `${action === ACTION.READ ? '[Read]' : '[Write]'}: ${label}`);
168
+ this.#labels.set(callback, `${action === ACTION.READ ? '[Read]' : '[Write]'}: ${label}`);
169
169
 
170
- if (this.pendingWorkFrames.length === 0) {
171
- this.pendingWorkFrames.push({
170
+ if (this.#pendingWorkFrames.length === 0) {
171
+ this.#pendingWorkFrames.push({
172
172
  readers: [],
173
173
  writers: [],
174
174
  });
175
175
  }
176
176
 
177
- const frame = this.pendingWorkFrames[0];
177
+ const frame = this.#pendingWorkFrames[0];
178
178
  if (!frame) {
179
179
  throw new Error('No frame available');
180
180
  }
@@ -193,8 +193,8 @@ export class RenderCoordinator extends EventTarget {
193
193
  }
194
194
 
195
195
  const resolverPromise = new Promise((resolve, reject) => {
196
- this.resolvers.set(callback, resolve);
197
- this.rejectors.set(callback, reject);
196
+ this.#resolvers.set(callback, resolve);
197
+ this.#rejectors.set(callback, reject);
198
198
  });
199
199
 
200
200
  this.scheduleWork();
@@ -203,24 +203,24 @@ export class RenderCoordinator extends EventTarget {
203
203
 
204
204
  private async handleWork(handler: CoordinatorCallback): Promise<void> {
205
205
  const data = await handler.call(undefined);
206
- const resolver = this.resolvers.get(handler);
206
+ const resolver = this.#resolvers.get(handler);
207
207
  if (!resolver) {
208
208
  throw new Error('Unable to locate resolver');
209
209
  }
210
210
 
211
211
  resolver.call(undefined, data);
212
- this.resolvers.delete(handler);
213
- this.rejectors.delete(handler);
212
+ this.#resolvers.delete(handler);
213
+ this.#rejectors.delete(handler);
214
214
  }
215
215
 
216
216
  private scheduleWork(): void {
217
- const hasScheduledWork = this.scheduledWorkId !== 0;
217
+ const hasScheduledWork = this.#scheduledWorkId !== 0;
218
218
  if (hasScheduledWork) {
219
219
  return;
220
220
  }
221
221
 
222
- this.scheduledWorkId = requestAnimationFrame(async () => {
223
- const hasPendingFrames = this.pendingWorkFrames.length > 0;
222
+ this.#scheduledWorkId = requestAnimationFrame(async () => {
223
+ const hasPendingFrames = this.#pendingWorkFrames.length > 0;
224
224
  if (!hasPendingFrames) {
225
225
  // No pending frames means all pending work has completed.
226
226
  // The events dispatched below are mostly for testing contexts.
@@ -231,14 +231,14 @@ export class RenderCoordinator extends EventTarget {
231
231
  window.dispatchEvent(new RenderCoordinatorQueueEmptyEvent());
232
232
 
233
233
  this.logIfEnabled('[Queue empty]');
234
- this.scheduledWorkId = 0;
234
+ this.#scheduledWorkId = 0;
235
235
  return;
236
236
  }
237
237
 
238
238
  this.dispatchEvent(new RenderCoordinatorNewFrameEvent());
239
239
  this.logIfEnabled('[New frame]');
240
240
 
241
- const frame = this.pendingWorkFrames.shift();
241
+ const frame = this.#pendingWorkFrames.shift();
242
242
  if (!frame) {
243
243
  return;
244
244
  }
@@ -247,7 +247,7 @@ export class RenderCoordinator extends EventTarget {
247
247
  // to proceed together.
248
248
  const readers: Promise<unknown>[] = [];
249
249
  for (const reader of frame.readers) {
250
- this.logIfEnabled(this.labels.get(reader));
250
+ this.logIfEnabled(this.#labels.get(reader));
251
251
  readers.push(this.handleWork(reader));
252
252
  }
253
253
 
@@ -268,7 +268,7 @@ export class RenderCoordinator extends EventTarget {
268
268
  // Next do all the writers as a block.
269
269
  const writers: Promise<unknown>[] = [];
270
270
  for (const writer of frame.writers) {
271
- this.logIfEnabled(this.labels.get(writer));
271
+ this.logIfEnabled(this.#labels.get(writer));
272
272
  writers.push(this.handleWork(writer));
273
273
  }
274
274
 
@@ -289,22 +289,22 @@ export class RenderCoordinator extends EventTarget {
289
289
  // Since there may have been more work requested in
290
290
  // the callback of a reader / writer, we attempt to schedule
291
291
  // it at this point.
292
- this.scheduledWorkId = 0;
292
+ this.#scheduledWorkId = 0;
293
293
  this.scheduleWork();
294
294
  });
295
295
  }
296
296
 
297
297
  private rejectAll(handlers: CoordinatorCallback[], error: Error): void {
298
298
  for (const handler of handlers) {
299
- const rejector = this.rejectors.get(handler);
299
+ const rejector = this.#rejectors.get(handler);
300
300
  if (!rejector) {
301
301
  console.warn('Unable to locate rejector');
302
302
  continue;
303
303
  }
304
304
 
305
305
  rejector.call(undefined, error);
306
- this.resolvers.delete(handler);
307
- this.rejectors.delete(handler);
306
+ this.#resolvers.delete(handler);
307
+ this.#rejectors.delete(handler);
308
308
  }
309
309
  }
310
310
 
@@ -317,11 +317,11 @@ export class RenderCoordinator extends EventTarget {
317
317
  return;
318
318
  }
319
319
 
320
- this.logInternal.push({time: performance.now(), value});
320
+ this.#logInternal.push({time: performance.now(), value});
321
321
 
322
322
  // Keep the log at the log size.
323
- while (this.logInternal.length > this.recordStorageLimit) {
324
- this.logInternal.shift();
323
+ while (this.#logInternal.length > this.recordStorageLimit) {
324
+ this.#logInternal.shift();
325
325
  }
326
326
  }
327
327
  }
@@ -36,16 +36,16 @@ export interface ReportData {
36
36
  export class Report extends HTMLElement {
37
37
  static readonly litTagName = LitHtml.literal`devtools-report`;
38
38
 
39
- private readonly shadow = this.attachShadow({mode: 'open'});
40
- private reportTitle: string = '';
39
+ readonly #shadow = this.attachShadow({mode: 'open'});
40
+ #reportTitle: string = '';
41
41
 
42
42
  set data({reportTitle}: ReportData) {
43
- this.reportTitle = reportTitle;
43
+ this.#reportTitle = reportTitle;
44
44
  this.render();
45
45
  }
46
46
 
47
47
  connectedCallback(): void {
48
- this.shadow.adoptedStyleSheets = [reportStyles];
48
+ this.#shadow.adoptedStyleSheets = [reportStyles];
49
49
  this.render();
50
50
  }
51
51
 
@@ -54,10 +54,10 @@ export class Report extends HTMLElement {
54
54
  // clang-format off
55
55
  LitHtml.render(LitHtml.html`
56
56
  <div class="content">
57
- ${this.reportTitle ? LitHtml.html`<div class="report-title">${this.reportTitle}</div>` : LitHtml.nothing}
57
+ ${this.#reportTitle ? LitHtml.html`<div class="report-title">${this.#reportTitle}</div>` : LitHtml.nothing}
58
58
  <slot></slot>
59
59
  </div>
60
- `, this.shadow, {host: this});
60
+ `, this.#shadow, {host: this});
61
61
  // clang-format on
62
62
  }
63
63
  }
@@ -69,9 +69,9 @@ export interface ReportSectionData {
69
69
  export class ReportSectionHeader extends HTMLElement {
70
70
  static readonly litTagName = LitHtml.literal`devtools-report-section-header`;
71
71
 
72
- private readonly shadow = this.attachShadow({mode: 'open'});
72
+ readonly #shadow = this.attachShadow({mode: 'open'});
73
73
  connectedCallback(): void {
74
- this.shadow.adoptedStyleSheets = [reportSectionHeaderStyles];
74
+ this.#shadow.adoptedStyleSheets = [reportSectionHeaderStyles];
75
75
  this.render();
76
76
  }
77
77
 
@@ -82,7 +82,7 @@ export class ReportSectionHeader extends HTMLElement {
82
82
  <div class="section-header">
83
83
  <slot></slot>
84
84
  </div>
85
- `, this.shadow, {host: this});
85
+ `, this.#shadow, {host: this});
86
86
  // clang-format on
87
87
  }
88
88
  }
@@ -90,9 +90,9 @@ export class ReportSectionHeader extends HTMLElement {
90
90
  export class ReportSectionDivider extends HTMLElement {
91
91
  static readonly litTagName = LitHtml.literal`devtools-report-divider`;
92
92
 
93
- private readonly shadow = this.attachShadow({mode: 'open'});
93
+ readonly #shadow = this.attachShadow({mode: 'open'});
94
94
  connectedCallback(): void {
95
- this.shadow.adoptedStyleSheets = [reportSectionDividerStyles];
95
+ this.#shadow.adoptedStyleSheets = [reportSectionDividerStyles];
96
96
  this.render();
97
97
  }
98
98
 
@@ -102,7 +102,7 @@ export class ReportSectionDivider extends HTMLElement {
102
102
  LitHtml.render(LitHtml.html`
103
103
  <div class="section-divider">
104
104
  </div>
105
- `, this.shadow, {host: this});
105
+ `, this.#shadow, {host: this});
106
106
  // clang-format on
107
107
  }
108
108
  }
@@ -110,9 +110,9 @@ export class ReportSectionDivider extends HTMLElement {
110
110
  export class ReportKey extends HTMLElement {
111
111
  static readonly litTagName = LitHtml.literal`devtools-report-key`;
112
112
 
113
- private readonly shadow = this.attachShadow({mode: 'open'});
113
+ readonly #shadow = this.attachShadow({mode: 'open'});
114
114
  connectedCallback(): void {
115
- this.shadow.adoptedStyleSheets = [reportKeyStyles];
115
+ this.#shadow.adoptedStyleSheets = [reportKeyStyles];
116
116
  this.render();
117
117
  }
118
118
 
@@ -121,7 +121,7 @@ export class ReportKey extends HTMLElement {
121
121
  // clang-format off
122
122
  LitHtml.render(LitHtml.html`
123
123
  <div class="key"><slot></slot></div>
124
- `, this.shadow, {host: this});
124
+ `, this.#shadow, {host: this});
125
125
  // clang-format on
126
126
  }
127
127
  }
@@ -129,9 +129,9 @@ export class ReportKey extends HTMLElement {
129
129
  export class ReportValue extends HTMLElement {
130
130
  static readonly litTagName = LitHtml.literal`devtools-report-value`;
131
131
 
132
- private readonly shadow = this.attachShadow({mode: 'open'});
132
+ readonly #shadow = this.attachShadow({mode: 'open'});
133
133
  connectedCallback(): void {
134
- this.shadow.adoptedStyleSheets = [reportValueStyles];
134
+ this.#shadow.adoptedStyleSheets = [reportValueStyles];
135
135
  this.render();
136
136
  }
137
137
 
@@ -140,7 +140,7 @@ export class ReportValue extends HTMLElement {
140
140
  // clang-format off
141
141
  LitHtml.render(LitHtml.html`
142
142
  <div class="value"><slot></slot></div>
143
- `, this.shadow, {host: this});
143
+ `, this.#shadow, {host: this});
144
144
  // clang-format on
145
145
  }
146
146
  }