Files
react-native-devtools-frontend/front_end/component_docs/computed_style_trace/basic.ts
T
Jack Franklin dc3e2cc169 Migrate color_swatch & computed_style_* examples to TS
Migrates the doc examples for:

* color_swatch
* computed_style_property
* computer_style_trace

Bug: 1144106
Change-Id: Id19e265acb181821a6eca0e326cb87e0e5ad2e83
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2614958
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-08 11:17:28 +00:00

25 lines
773 B
TypeScript

// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import * as Elements from '../../elements/elements.js';
const component = new Elements.ComputedStyleTrace.ComputedStyleTrace();
const traceValue = document.createElement('span');
traceValue.textContent = 'block';
traceValue.slot = 'trace-value';
component.appendChild(traceValue);
const traceLink = document.createElement('span');
traceLink.textContent = 'user agent stylesheet';
traceLink.slot = 'trace-link';
component.appendChild(traceLink);
document.getElementById('container')?.appendChild(component);
component.data = {
selector: 'body',
active: true,
onNavigateToSource: (): void => {},
};