| 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 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/repositories.dart' show ScriptRepository; | 9 import 'package:observatory/repositories.dart' show ScriptRepository; |
| 10 import 'package:observatory/service_html.dart' show SourceLocation; | 10 import 'package:observatory/service_html.dart' show SourceLocation; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 super.attached(); | 38 super.attached(); |
| 39 render(); | 39 render(); |
| 40 } | 40 } |
| 41 | 41 |
| 42 Future render() async { | 42 Future render() async { |
| 43 shadowRoot.children = []; | 43 shadowRoot.children = []; |
| 44 if (_location == null) { | 44 if (_location == null) { |
| 45 return; | 45 return; |
| 46 } | 46 } |
| 47 | 47 |
| 48 ScriptRepository repository = new ScriptRepository(_location.isolate); | |
| 49 | |
| 50 shadowRoot.children = [ | 48 shadowRoot.children = [ |
| 51 new StyleElement() | 49 new StyleElement() |
| 52 ..text = ''' | 50 ..text = ''' |
| 53 source-link-wrapped > a[href]:hover { | 51 source-link-wrapped > a[href]:hover { |
| 54 text-decoration: underline; | 52 text-decoration: underline; |
| 55 } | 53 } |
| 56 source-link-wrapped > a[href] { | 54 source-link-wrapped > a[href] { |
| 57 color: #0489c3; | 55 color: #0489c3; |
| 58 text-decoration: none; | 56 text-decoration: none; |
| 59 }''', | 57 }''', |
| 60 new SourceLinkElement(_location.isolate, _location, repository, | 58 new SourceLinkElement(_location.isolate, _location, |
| 59 new ScriptRepository(), |
| 61 queue: ObservatoryApplication.app.queue) | 60 queue: ObservatoryApplication.app.queue) |
| 62 ]; | 61 ]; |
| 63 } | 62 } |
| 64 } | 63 } |
| OLD | NEW |