chrome-devtools-frontend 1.0.1529904 → 1.0.1531367
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/eslint.config.mjs +1 -1
- package/front_end/core/common/Worker.ts +10 -2
- package/front_end/core/host/AidaClient.ts +3 -3
- package/front_end/core/host/InspectorFrontendHostAPI.ts +1 -2
- package/front_end/core/sdk/NetworkManager.ts +180 -42
- package/front_end/core/sdk/SourceMap.ts +6 -1
- package/front_end/core/sdk/SourceMapScopesInfo.ts +73 -7
- package/front_end/entrypoints/main/main-meta.ts +2 -0
- package/front_end/entrypoints/trace_app/trace_app.ts +1 -0
- package/front_end/generated/SupportedCSSProperties.js +7 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatterBounds.snapshot.txt +4 -0
- package/front_end/models/ai_assistance/performance/AICallTree.ts +2 -3
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +3 -3
- package/front_end/models/bindings/CompilerScriptMapping.ts +16 -14
- package/front_end/models/formatter/FormatterWorkerPool.ts +17 -1
- package/front_end/models/javascript_metadata/NativeFunctions.js +8 -2
- package/front_end/models/trace/ModelImpl.ts +8 -3
- package/front_end/models/trace/handlers/MetaHandler.ts +9 -1
- package/front_end/models/trace/types/Configuration.ts +1 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +1 -1
- package/front_end/panels/browser_debugger/browser_debugger-meta.ts +2 -1
- package/front_end/panels/changes/CombinedDiffView.ts +1 -2
- package/front_end/panels/console/ConsoleInsightTeaser.ts +120 -59
- package/front_end/panels/console/ConsolePrompt.ts +1 -1
- package/front_end/panels/console/ConsoleSidebar.ts +3 -3
- package/front_end/panels/console/ConsoleViewMessage.ts +7 -5
- package/front_end/panels/console/consoleInsightTeaser.css +0 -4
- package/front_end/panels/elements/ElementsTreeOutline.ts +1 -2
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +137 -37
- package/front_end/panels/mobile_throttling/ThrottlingPresets.ts +1 -1
- package/front_end/panels/network/BlockedURLsPane.ts +30 -6
- package/front_end/panels/network/NetworkLogView.ts +135 -33
- package/front_end/panels/network/blockedURLsPane.css +5 -0
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +1 -1
- package/front_end/panels/sources/SourcesPanel.ts +5 -0
- package/front_end/panels/sources/sources-meta.ts +14 -12
- package/front_end/panels/sources/sourcesView.css +1 -0
- package/front_end/panels/timeline/TimelinePanel.ts +1 -0
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +1 -2
- package/front_end/panels/timeline/TimelineTreeView.ts +3 -3
- package/front_end/panels/timeline/TimelineUIUtils.ts +16 -16
- package/front_end/services/tracing/FreshRecording.ts +4 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +16 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +9 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts +7 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +12 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/NodeWebSocketTransport.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/NodeWebSocketTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +7 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +13 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +7 -0
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +40 -14
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +16 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +9 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts +7 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +12 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +7 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +10 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +7 -0
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +18 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +9 -1
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserConnector.ts +2 -0
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +8 -0
- package/front_end/third_party/puppeteer/package/src/common/util.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +16 -5
- package/front_end/third_party/puppeteer/package/src/node/NodeWebSocketTransport.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +10 -0
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +1 -1
- package/front_end/ui/components/icon_button/Icon.docs.ts +78 -0
- package/front_end/ui/components/markdown_view/CodeBlock.ts +2 -2
- package/front_end/ui/components/text_editor/config.ts +3 -3
- package/front_end/ui/components/tooltips/Tooltip.ts +9 -4
- package/front_end/ui/legacy/UIUtils.ts +12 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +6 -0
- package/package.json +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +0 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +0 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +0 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +0 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js.map +0 -1
- package/front_end/third_party/puppeteer/package/src/generated/version.ts +0 -4
- package/front_end/ui/components/copy_to_clipboard/copyToClipboard.ts +0 -19
- package/front_end/ui/components/copy_to_clipboard/copy_to_clipboard.ts +0 -5
- package/front_end/ui/components/docs/icon_component/basic.html +0 -40
- package/front_end/ui/components/docs/icon_component/basic.ts +0 -68
|
@@ -8,8 +8,8 @@ import '../../../ui/legacy/legacy.js'; // for x-link
|
|
|
8
8
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
9
9
|
import * as CodeMirror from '../../../third_party/codemirror.next/codemirror.next.js';
|
|
10
10
|
import * as Buttons from '../../../ui/components/buttons/buttons.js';
|
|
11
|
-
import * as CopyToClipboard from '../../../ui/components/copy_to_clipboard/copy_to_clipboard.js';
|
|
12
11
|
import * as TextEditor from '../../../ui/components/text_editor/text_editor.js';
|
|
12
|
+
import * as UI from '../../../ui/legacy/legacy.js';
|
|
13
13
|
import * as Lit from '../../lit/lit.js';
|
|
14
14
|
import * as VisualLogging from '../../visual_logging/visual_logging.js';
|
|
15
15
|
|
|
@@ -191,7 +191,7 @@ export class CodeBlock extends HTMLElement {
|
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
#onCopy(): void {
|
|
194
|
-
|
|
194
|
+
UI.UIUtils.copyTextToClipboard(this.#code, i18nString(UIStrings.copied));
|
|
195
195
|
this.#copied = true;
|
|
196
196
|
void this.#render();
|
|
197
197
|
clearTimeout(this.#timer);
|
|
@@ -488,10 +488,10 @@ export const setAiAutoCompleteSuggestion = CM.StateEffect.define<ActiveSuggestio
|
|
|
488
488
|
interface ActiveSuggestion {
|
|
489
489
|
text: string;
|
|
490
490
|
from: number;
|
|
491
|
-
sampleId
|
|
491
|
+
sampleId?: number;
|
|
492
492
|
rpcGlobalId?: Host.AidaClient.RpcGlobalId;
|
|
493
493
|
startTime: number;
|
|
494
|
-
onImpression: (rpcGlobalId: Host.AidaClient.RpcGlobalId,
|
|
494
|
+
onImpression: (rpcGlobalId: Host.AidaClient.RpcGlobalId, latency: number, sampleId?: number) => void;
|
|
495
495
|
clearCachedRequest: () => void;
|
|
496
496
|
}
|
|
497
497
|
|
|
@@ -679,7 +679,7 @@ export const aiAutoCompleteSuggestion: CM.Extension = [
|
|
|
679
679
|
}
|
|
680
680
|
const latency = performance.now() - activeSuggestion.startTime;
|
|
681
681
|
// only register impression for the first time AI generated suggestion is shown to the user.
|
|
682
|
-
activeSuggestion.onImpression(activeSuggestion.rpcGlobalId, activeSuggestion.sampleId
|
|
682
|
+
activeSuggestion.onImpression(activeSuggestion.rpcGlobalId, latency, activeSuggestion.sampleId);
|
|
683
683
|
this.#lastLoggedSuggestion = activeSuggestion;
|
|
684
684
|
}
|
|
685
685
|
},
|
|
@@ -374,6 +374,10 @@ export class Tooltip extends HTMLElement {
|
|
|
374
374
|
}, this.hoverDelay);
|
|
375
375
|
};
|
|
376
376
|
|
|
377
|
+
#containsNode(target: EventTarget|null): boolean {
|
|
378
|
+
return target instanceof Node && this.contains(target);
|
|
379
|
+
}
|
|
380
|
+
|
|
377
381
|
hideTooltip = (event?: MouseEvent|FocusEvent): void => {
|
|
378
382
|
if (this.#timeout) {
|
|
379
383
|
window.clearTimeout(this.#timeout);
|
|
@@ -382,10 +386,11 @@ export class Tooltip extends HTMLElement {
|
|
|
382
386
|
// 1. event.currentTarget = the element that got blurred
|
|
383
387
|
// 2. event.relatedTarget = the element that gained focus
|
|
384
388
|
// https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/relatedTarget
|
|
385
|
-
// If the blurred element (1) was our anchor
|
|
386
|
-
// (2) is within the tooltip,
|
|
387
|
-
|
|
388
|
-
|
|
389
|
+
// If the blurred element (1) was our anchor or within the tooltip,
|
|
390
|
+
// and the newly focused element (2) is within the tooltip,
|
|
391
|
+
// we do not want to hide the tooltip.
|
|
392
|
+
if (event && this.variant === 'rich' && (event.target === this.#anchor || this.#containsNode(event.target)) &&
|
|
393
|
+
this.#containsNode(event.relatedTarget)) {
|
|
389
394
|
return;
|
|
390
395
|
}
|
|
391
396
|
|
|
@@ -2336,3 +2336,15 @@ export class HTMLElementWithLightDOMTemplate extends HTMLElement {
|
|
|
2336
2336
|
return targetElement;
|
|
2337
2337
|
}
|
|
2338
2338
|
}
|
|
2339
|
+
|
|
2340
|
+
/**
|
|
2341
|
+
* @param text Text to copy to clipboard
|
|
2342
|
+
* @param alert Message to send for a11y only required if there
|
|
2343
|
+
* were other UI changes that visually indicated this copy happened.
|
|
2344
|
+
*/
|
|
2345
|
+
export function copyTextToClipboard(text: string, alert?: string): void {
|
|
2346
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(text);
|
|
2347
|
+
if (alert) {
|
|
2348
|
+
ARIAUtils.LiveAnnouncer.alert(alert);
|
|
2349
|
+
}
|
|
2350
|
+
}
|
|
@@ -575,6 +575,7 @@ export const knownContextValues = new Set([
|
|
|
575
575
|
'black-berry-play-book-2.1',
|
|
576
576
|
'blackbox',
|
|
577
577
|
'ble',
|
|
578
|
+
'block',
|
|
578
579
|
'block-ellipsis',
|
|
579
580
|
'block-request-domain',
|
|
580
581
|
'block-request-url',
|
|
@@ -1688,6 +1689,7 @@ export const knownContextValues = new Set([
|
|
|
1688
1689
|
'freestyler.feedback',
|
|
1689
1690
|
'freestyler.help',
|
|
1690
1691
|
'freestyler.history',
|
|
1692
|
+
'freestyler.history-item',
|
|
1691
1693
|
'freestyler.main-menu',
|
|
1692
1694
|
'freestyler.new-chat',
|
|
1693
1695
|
'freestyler.send-feedback',
|
|
@@ -3082,6 +3084,7 @@ export const knownContextValues = new Set([
|
|
|
3082
3084
|
'request-animation-frame.callback',
|
|
3083
3085
|
'request-blocking-enabled',
|
|
3084
3086
|
'request-blocking-enabled-true',
|
|
3087
|
+
'request-conditions',
|
|
3085
3088
|
'request-details',
|
|
3086
3089
|
'request-header',
|
|
3087
3090
|
'request-header-accept',
|
|
@@ -3165,6 +3168,7 @@ export const knownContextValues = new Set([
|
|
|
3165
3168
|
'rule',
|
|
3166
3169
|
'rule-break',
|
|
3167
3170
|
'rule-color',
|
|
3171
|
+
'rule-outset',
|
|
3168
3172
|
'rule-set',
|
|
3169
3173
|
'rule-set-details',
|
|
3170
3174
|
'rule-style',
|
|
@@ -3744,6 +3748,8 @@ export const knownContextValues = new Set([
|
|
|
3744
3748
|
'third-party-tree',
|
|
3745
3749
|
'third-property',
|
|
3746
3750
|
'this-origin',
|
|
3751
|
+
'throttle-request-domain',
|
|
3752
|
+
'throttle-request-url',
|
|
3747
3753
|
'throttling-conditions',
|
|
3748
3754
|
'throttling.calibrate',
|
|
3749
3755
|
'throttling.calibrate-cancel',
|
package/package.json
CHANGED
package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../../src/generated/version.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,cAAc,YAAY,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../src/generated/version.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACU,QAAA,cAAc,GAAG,SAAS,CAAC"}
|
package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../../src/generated/version.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,cAAc,YAAY,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../src/generated/version.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,SAAS,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// Copyright 2025 The Chromium Authors
|
|
3
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
4
|
-
// found in the LICENSE file.
|
|
5
|
-
|
|
6
|
-
import * as Host from '../../../core/host/host.js';
|
|
7
|
-
import * as UI from '../../legacy/legacy.js';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @param text Text to copy to clipboard
|
|
11
|
-
* @param alert Message to send for a11y
|
|
12
|
-
*/
|
|
13
|
-
export function copyTextToClipboard(text: string, alert?: string): void {
|
|
14
|
-
Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(text);
|
|
15
|
-
// TODO: make alert required.
|
|
16
|
-
if (alert) {
|
|
17
|
-
UI.ARIAUtils.LiveAnnouncer.alert(alert);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
Copyright 2020 The Chromium Authors
|
|
3
|
-
Use of this source code is governed by a BSD-style license that can be
|
|
4
|
-
found in the LICENSE file.
|
|
5
|
-
-->
|
|
6
|
-
<!DOCTYPE html>
|
|
7
|
-
<html>
|
|
8
|
-
<head>
|
|
9
|
-
<meta charset="UTF-8" />
|
|
10
|
-
<meta name="viewport" content="width=device-width" />
|
|
11
|
-
<title>Element explore icon example</title>
|
|
12
|
-
<style>
|
|
13
|
-
#icon-overview {
|
|
14
|
-
width: 80%;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
td,
|
|
18
|
-
th {
|
|
19
|
-
text-align: left;
|
|
20
|
-
width: 50%;
|
|
21
|
-
height: 50px;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.custom-color {
|
|
25
|
-
color: blue;
|
|
26
|
-
}
|
|
27
|
-
</style>
|
|
28
|
-
</head>
|
|
29
|
-
<body>
|
|
30
|
-
|
|
31
|
-
<table id='icon-overview'>
|
|
32
|
-
<tr>
|
|
33
|
-
<th>Icon description</th>
|
|
34
|
-
<th>Icon</th>
|
|
35
|
-
</tr>
|
|
36
|
-
</table>
|
|
37
|
-
|
|
38
|
-
<script type="module" src="./basic.js"></script>
|
|
39
|
-
</body>
|
|
40
|
-
</html>
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
// Copyright 2020 The Chromium Authors
|
|
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 Lit from '../../../lit/lit.js';
|
|
6
|
-
import * as ComponentHelpers from '../../helpers/helpers.js';
|
|
7
|
-
import * as IconButton from '../../icon_button/icon_button.js';
|
|
8
|
-
|
|
9
|
-
const {html} = Lit;
|
|
10
|
-
|
|
11
|
-
await ComponentHelpers.ComponentServerSetup.setup();
|
|
12
|
-
|
|
13
|
-
const iconTable = document.getElementById('icon-overview');
|
|
14
|
-
|
|
15
|
-
const row1 = document.createElement('tr');
|
|
16
|
-
const iconDescription1 = document.createElement('td');
|
|
17
|
-
iconDescription1.textContent = 'Programmatically created with default size and color';
|
|
18
|
-
row1.appendChild(iconDescription1);
|
|
19
|
-
|
|
20
|
-
const icon = IconButton.Icon.create('select-element');
|
|
21
|
-
const icon1 = document.createElement('td');
|
|
22
|
-
icon1.appendChild(icon);
|
|
23
|
-
row1.appendChild(icon1);
|
|
24
|
-
|
|
25
|
-
iconTable?.appendChild(row1);
|
|
26
|
-
|
|
27
|
-
const row2 = document.createElement('tr');
|
|
28
|
-
const iconDescription2 = document.createElement('td');
|
|
29
|
-
iconDescription2.textContent = 'Programmatically created with custom size and color';
|
|
30
|
-
row2.appendChild(iconDescription2);
|
|
31
|
-
|
|
32
|
-
const otherIcon = IconButton.Icon.create('issue-exclamation-filled');
|
|
33
|
-
otherIcon.classList.toggle('custom-size-and-color');
|
|
34
|
-
const icon2 = document.createElement('td');
|
|
35
|
-
icon2.appendChild(otherIcon);
|
|
36
|
-
row2.appendChild(icon2);
|
|
37
|
-
|
|
38
|
-
iconTable?.appendChild(row2);
|
|
39
|
-
|
|
40
|
-
const row3 = document.createElement('tr');
|
|
41
|
-
const iconDescription3 = document.createElement('td');
|
|
42
|
-
iconDescription3.textContent = 'Created through html template with default size and color';
|
|
43
|
-
row3.appendChild(iconDescription3);
|
|
44
|
-
|
|
45
|
-
const icon3 = document.createElement('td');
|
|
46
|
-
Lit.render(
|
|
47
|
-
html`
|
|
48
|
-
<devtools-icon name="select-element"></devtools-icon>
|
|
49
|
-
`,
|
|
50
|
-
icon3);
|
|
51
|
-
row3.appendChild(icon3);
|
|
52
|
-
|
|
53
|
-
iconTable?.appendChild(row3);
|
|
54
|
-
|
|
55
|
-
const row4 = document.createElement('tr');
|
|
56
|
-
const iconDescription4 = document.createElement('td');
|
|
57
|
-
iconDescription4.textContent = 'Created through html template with custom size and color';
|
|
58
|
-
row4.appendChild(iconDescription4);
|
|
59
|
-
|
|
60
|
-
const icon4 = document.createElement('td');
|
|
61
|
-
Lit.render(
|
|
62
|
-
html`
|
|
63
|
-
<devtools-icon name="select-element" class="custom-color small"></devtools-icon>
|
|
64
|
-
`,
|
|
65
|
-
icon4);
|
|
66
|
-
row4.appendChild(icon4);
|
|
67
|
-
|
|
68
|
-
iconTable?.appendChild(row4);
|