mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-11 14:14:36 +08:00
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>
25 lines
773 B
TypeScript
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 => {},
|
|
};
|