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

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

Issue 2168463004: Converted Observatory isolate-nav-menu element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merged with master 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
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:html'; 5 import 'dart:html';
6 import 'dart:async'; 6 import 'dart:async';
7 import 'package:observatory/src/elements/helpers/tag.dart'; 7 import 'package:observatory/src/elements/helpers/tag.dart';
8 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; 8 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart';
9 9
10 class NavMenuElement extends HtmlElement implements Renderable { 10 class NavMenuElement extends HtmlElement implements Renderable {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 super.detached(); _r.disable(notify: true); 82 super.detached(); _r.disable(notify: true);
83 shadowRoot.children = []; 83 shadowRoot.children = [];
84 } 84 }
85 85
86 void render() { 86 void render() {
87 List<Element> children = [ 87 List<Element> children = [
88 _style.clone(true), 88 _style.clone(true),
89 new LIElement() 89 new LIElement()
90 ..classes = ['nav-menu_label'] 90 ..classes = ['nav-menu_label']
91 ..children = [ 91 ..children = [
92 new AnchorElement(href: '#$link') 92 new AnchorElement(href: link)
93 ..text = label, 93 ..text = label,
94 new UListElement() 94 new UListElement()
95 ..children = [ 95 ..children = [
96 new ContentElement() 96 new ContentElement()
97 ] 97 ]
98 ] 98 ]
99 ]; 99 ];
100 if (!last) { 100 if (!last) {
101 children.add( 101 children.add(
102 new LIElement() 102 new LIElement()
103 ..classes = ['nav-menu_spacer'] 103 ..classes = ['nav-menu_spacer']
104 ..innerHtml = '&gt;' 104 ..innerHtml = '&gt;'
105 ); 105 );
106 } 106 }
107 shadowRoot.children = children; 107 shadowRoot.children = children;
108 } 108 }
109 } 109 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698