blob: 05096ded8d8fee779abf862beeb567c49198e6b3 [file] [log] [blame]
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library library_view_element;
import 'package:logging/logging.dart';
import 'package:polymer/polymer.dart';
import 'observatory_element.dart';
@CustomTag('library-view')
class LibraryViewElement extends ObservatoryElement {
@published Map library = toObservable({});
LibraryViewElement.created() : super.created();
void refresh(var done) {
var url = app.locationManager.currentIsolateRelativeLink(library['id']);
app.requestManager.requestMap(url).then((map) {
library = map;
}).catchError((e, trace) {
Logger.root.severe('Error while refreshing library-view: $e\n$trace');
}).whenComplete(done);
}
}