Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(980)

Side by Side Diff: runtime/observatory/lib/src/elements/class_ref_wrapper.dart

Issue 2310003004: Removed polymer & mirror from Observatory (Closed)
Patch Set: Fixed crash in heap-map page Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'dart:html';
6
7 import 'package:observatory/app.dart';
8 import 'package:observatory/service_html.dart' show Class;
9 import 'package:observatory/src/elements/class_ref.dart';
10 import 'package:observatory/src/elements/helpers/tag.dart';
11 import 'package:observatory/src/elements/shims/binding.dart';
12
13 @bindable
14 class ClassRefElementWrapper extends HtmlElement {
15
16 static const binder = const Binder<ClassRefElementWrapper>(const {
17 'ref': #ref
18 });
19
20 static const tag = const Tag<ClassRefElementWrapper>('class-ref');
21
22 Class _class;
23 Class get ref => _class;
24 void set ref(Class ref) {
25 _class = ref;
26 render();
27 }
28
29 ClassRefElementWrapper.created() : super.created() {
30 binder.registerCallback(this);
31 createShadowRoot();
32 render();
33 }
34
35 @override
36 void attached() {
37 super.attached();
38 render();
39 }
40
41 void render() {
42 shadowRoot.children = [];
43 if (ref == null) return;
44
45 shadowRoot.children = [
46 new StyleElement()
47 ..text = '''
48 class-ref-wrapped > a[href]:hover {
49 text-decoration: underline;
50 }
51 class-ref-wrapped > a[href] {
52 color: #0489c3;
53 text-decoration: none;
54 }''',
55 new ClassRefElement(_class.isolate, _class,
56 queue: ObservatoryApplication.app.queue)
57 ];
58 }
59 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/class_ref_as_value.html ('k') | runtime/observatory/lib/src/elements/class_tree.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698