OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 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 | 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 | 7 |
8 import 'package:observatory/app.dart'; | 8 import 'package:observatory/app.dart'; |
9 import 'package:observatory/service_html.dart' show Script; | 9 import 'package:observatory/service_html.dart' show Script; |
10 import 'package:observatory/src/elements/script_ref.dart'; | 10 import 'package:observatory/src/elements/script_ref.dart'; |
(...skipping 23 matching lines...) Expand all Loading... |
34 super.attached(); | 34 super.attached(); |
35 render(); | 35 render(); |
36 } | 36 } |
37 | 37 |
38 Future render() async { | 38 Future render() async { |
39 shadowRoot.children = []; | 39 shadowRoot.children = []; |
40 if (_script == null) return; | 40 if (_script == null) return; |
41 | 41 |
42 shadowRoot.children = [ | 42 shadowRoot.children = [ |
43 new StyleElement() | 43 new StyleElement() |
44 ..text = '@import "packages/observatory/src/elements/css/shared.css";', | 44 ..text = ''' |
| 45 script-ref-wrapped > a[href]:hover { |
| 46 text-decoration: underline; |
| 47 } |
| 48 script-ref-wrapped > a[href] { |
| 49 color: #0489c3; |
| 50 text-decoration: none; |
| 51 }''', |
45 new ScriptRefElement(_script.isolate, _script, | 52 new ScriptRefElement(_script.isolate, _script, |
46 queue: ObservatoryApplication.app.queue) | 53 queue: ObservatoryApplication.app.queue) |
47 ]; | 54 ]; |
48 } | 55 } |
49 } | 56 } |
OLD | NEW |