Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: runtime/observatory/lib/src/elements/eval_link.dart

Issue 2310003004: Removed polymer & mirror from Observatory (Closed)
Patch Set: Fixed crash in heap-map page Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 eval_link_element;
6
7 import 'package:observatory/service.dart';
8 import 'observatory_element.dart';
9 import 'package:polymer/polymer.dart';
10
11 @CustomTag('eval-link')
12 class EvalLinkElement extends ObservatoryElement {
13 EvalLinkElement.created() : super.created();
14
15 @observable bool busy = false;
16 @published String label = "[evaluate]";
17 @published var callback = null;
18 @published var expr = '';
19 @published var result = null;
20 @published var error = null;
21
22 void evalNow(var a, var b, var c) {
23 if (busy) {
24 return;
25 }
26 if (callback != null) {
27 busy = true;
28 result = null;
29 callback(expr).then((ServiceObject obj) {
30 result = obj;
31 }).catchError((e, st) {
32 error = e.message;
33 app.handleException(e, st);
34 }).whenComplete(() {
35 busy = false;
36 });
37 }
38 }
39 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/eval_box_wrapper.dart ('k') | runtime/observatory/lib/src/elements/eval_link.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698