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 library class_ref_element; | 5 library class_ref_element; |
6 | 6 |
7 import 'package:polymer/polymer.dart'; | 7 import 'package:polymer/polymer.dart'; |
8 import 'service_ref.dart'; | 8 import 'service_ref.dart'; |
9 | 9 |
10 @CustomTag('class-ref') | 10 @CustomTag('class-ref') |
11 class ClassRefElement extends ServiceRefElement { | 11 class ClassRefElement extends ServiceRefElement { |
12 ClassRefElement.created() : super.created(); | 12 ClassRefElement.created() : super.created(); |
13 } | 13 |
| 14 refChanged(oldValue) { |
| 15 super.refChanged(oldValue); |
| 16 _updateShadowDom(); |
| 17 } |
| 18 |
| 19 void _updateShadowDom() { |
| 20 clearShadowRoot(); |
| 21 if (ref == null) { |
| 22 return; |
| 23 } |
| 24 insertLinkIntoShadowRoot(name, url, hoverText); |
| 25 } |
| 26 } |
OLD | NEW |