Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 library script_ref_element; | |
| 6 | |
| 7 import 'package:polymer/polymer.dart'; | |
| 8 import 'observatory_element.dart'; | |
| 9 | |
| 10 @CustomTag('script-ref') | |
| 11 class ScriptRefElement extends ObservatoryElement { | |
| 12 @published Map ref; | |
| 13 @published String scriptURL = ''; | |
| 14 ScriptRefElement.created() : super.created(); | |
| 15 | |
| 16 void refChanged(oldValue) { | |
| 17 notifyPropertyChange(#url, "", url); | |
| 18 notifyPropertyChange(#name, [], name); | |
| 19 } | |
| 20 | |
| 21 void scriptURLChanged(oldValue) { | |
| 22 notifyPropertyChange(#url, "", url); | |
| 23 notifyPropertyChange(#name, [], name); | |
| 24 } | |
| 25 | |
| 26 String get url { | |
| 27 print('$app $ref'); | |
|
turnidge
2013/12/19 20:39:29
Do you mean to have this print here?
Cutch
2013/12/19 21:53:58
Removed.
| |
| 28 if (app != null && ref != null) { | |
| 29 return app.locationManager.currentIsolateRelativeLink(ref['id']); | |
| 30 } else if (app != null) { | |
| 31 return app.locationManager.currentIsolateScriptLink(scriptURL); | |
| 32 } | |
|
turnidge
2013/12/19 20:39:29
So sometimes we build a script-ref from a 'ref' an
Cutch
2013/12/19 21:53:58
Yes, it's just because 'frame' outputs a 'url' pro
| |
| 33 return ''; | |
| 34 } | |
| 35 | |
| 36 String get name { | |
| 37 return ref != null ? ref['name'] : scriptURL; | |
| 38 } | |
| 39 } | |
| OLD | NEW |