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

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

Issue 2119733003: Wrapping leaf nodes in non polymer elements (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 import 'package:observatory/service_html.dart';
7 import 'shims/binding.dart';
8 import 'helpers/tag.dart';
9 import 'isolate_ref.dart';
10
11 class IsolateRefElementWrapper extends HtmlElement {
12
13 static final binder = new Binder<IsolateRefElementWrapper>(
14 const [const Binding('ref')]);
15
16 static const tag = const Tag<IsolateRefElementWrapper>('isolate-ref');
17
18 Isolate _ref;
19 Isolate get ref => _ref;
20 void set ref(Isolate ref) { _ref = ref; render();}
21
22 IsolateRefElementWrapper.created() : super.created() {
23 binder.registerCallback(this);
24 createShadowRoot();
25 render();
26 }
27
28 @override
29 void attached() {
30 super.attached();
31 render();
32 }
33
34 void render() {
35 shadowRoot.children = [];
36 if (ref == null) return;
37
38 shadowRoot.children = [
39 new IsolateRefElement(isolate: _ref)
40 ];
41 }
42 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698