Chromium Code Reviews| 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 observatory_element; | 5 library observatory_element; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:html'; | 8 import 'dart:html'; |
| 9 import 'package:observatory/app.dart'; | 9 import 'package:observatory/app.dart'; |
| 10 import 'package:polymer/polymer.dart'; | 10 import 'package:polymer/polymer.dart'; |
| 11 | 11 |
| 12 /// Base class for all Observatory custom elements. | 12 /// Base class for all Observatory custom elements. |
| 13 @CustomTag('observatory-element') | 13 @CustomTag('observatory-element') |
| 14 class ObservatoryElement extends PolymerElement { | 14 class ObservatoryElement extends PolymerElement { |
| 15 ObservatoryElement.created() : super.created(); | 15 ObservatoryElement.created() : super.created(); |
| 16 | 16 |
| 17 ObservatoryApplication get app => ObservatoryApplication.app; | 17 ObservatoryApplication get app => ObservatoryApplication.app; |
| 18 @published ObservableMap args; | |
|
Cutch
2014/07/09 15:49:22
I wonder if this is the best way to pass args to e
turnidge
2014/07/09 17:37:08
Reworked.
| |
| 18 | 19 |
| 19 @override | 20 @override |
| 20 void attached() { | 21 void attached() { |
| 21 super.attached(); | 22 super.attached(); |
| 22 _startPoll(); | 23 _startPoll(); |
| 23 } | 24 } |
| 24 | 25 |
| 25 @override | 26 @override |
| 26 void attributeChanged(String name, var oldValue, var newValue) { | 27 void attributeChanged(String name, var oldValue, var newValue) { |
| 27 super.attributeChanged(name, oldValue, newValue); | 28 super.attributeChanged(name, oldValue, newValue); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 155 'Bool', | 156 'Bool', |
| 156 'String', | 157 'String', |
| 157 'Double', | 158 'Double', |
| 158 'Instance', | 159 'Instance', |
| 159 'GrowableObjectArray', | 160 'GrowableObjectArray', |
| 160 'Array', | 161 'Array', |
| 161 'Type', | 162 'Type', |
| 162 'Error'].contains(type)); | 163 'Error'].contains(type)); |
| 163 } | 164 } |
| 164 } | 165 } |
| OLD | NEW |