OLD | NEW |
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 | 6 |
7 import 'package:observatory/app.dart'; | 7 import 'package:observatory/app.dart'; |
8 import 'package:observatory/src/elements/helpers/tag.dart'; | 8 import 'package:observatory/src/elements/helpers/tag.dart'; |
9 import 'package:observatory/src/elements/shims/binding.dart'; | 9 import 'package:observatory/src/elements/shims/binding.dart'; |
10 import 'package:observatory/src/elements/nav/menu_item.dart'; | 10 import 'package:observatory/src/elements/nav/menu_item.dart'; |
(...skipping 28 matching lines...) Expand all Loading... |
39 void attached() { | 39 void attached() { |
40 super.attached(); | 40 super.attached(); |
41 render(); | 41 render(); |
42 } | 42 } |
43 | 43 |
44 void render() { | 44 void render() { |
45 shadowRoot.children = []; | 45 shadowRoot.children = []; |
46 if (_anchor == null) return; | 46 if (_anchor == null) return; |
47 | 47 |
48 shadowRoot.children = [ | 48 shadowRoot.children = [ |
49 new NavMenuItemElement(_anchor, link: _link, | 49 new NavMenuItemElement(_anchor, link: '#$link', |
50 queue: ObservatoryApplication.app.queue) | 50 queue: ObservatoryApplication.app.queue) |
51 ..children = [new ContentElement()] | 51 ..children = [new ContentElement()] |
52 ]; | 52 ]; |
53 } | 53 } |
54 } | 54 } |
OLD | NEW |