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

Side by Side Diff: pkg/observe/lib/observe_html.dart

Issue 23431010: Change in deploy.dart to make it easier to run in run.sh without running pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/polymer/lib/deploy.dart » ('j') | pkg/polymer/lib/deploy.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // TODO(jmesserly): can we handle this more elegantly? 5 // TODO(jmesserly): can we handle this more elegantly?
6 // In general, it seems like we want a convenient way to take a Stream plus a 6 // In general, it seems like we want a convenient way to take a Stream plus a
7 // getter and convert this into an Observable. 7 // getter and convert this into an Observable.
8 8
9 /** Helpers for exposing dart:html as observable data. */ 9 /** Helpers for exposing dart:html as observable data. */
10 library polymer.observe_html; 10 library observe_html;
Jennifer Messerly 2013/08/29 18:21:24 this should be observe.observe_html right? actual
11 11
12 import 'dart:html'; 12 import 'dart:html';
13 import 'package:observe/observe.dart'; 13 import 'package:observe/observe.dart';
Jennifer Messerly 2013/08/29 18:21:24 import 'observe.dart';
Siggi Cherem (dart-lang) 2013/08/30 00:00:41 Done.
14 14
15 /** An observable version of [window.location.hash]. */ 15 /** An observable version of [window.location.hash]. */
16 final ObservableLocationHash windowLocation = new ObservableLocationHash._(); 16 final ObservableLocationHash windowLocation = new ObservableLocationHash._();
17 17
18 class ObservableLocationHash extends ChangeNotifierBase { 18 class ObservableLocationHash extends ChangeNotifierBase {
19 ObservableLocationHash._() { 19 ObservableLocationHash._() {
20 // listen on changes to #hash in the URL 20 // listen on changes to #hash in the URL
21 // Note: listen on both popState and hashChange, because IE9 doesn't support 21 // Note: listen on both popState and hashChange, because IE9 doesn't support
22 // history API. See http://dartbug.com/5483 22 // history API. See http://dartbug.com/5483
23 // TODO(jmesserly): only listen to these if someone is listening to our 23 // TODO(jmesserly): only listen to these if someone is listening to our
(...skipping 30 matching lines...) Expand all
54 } 54 }
55 55
56 /** Bind a CSS class to the observable [object] and property [path]. */ 56 /** Bind a CSS class to the observable [object] and property [path]. */
57 PathObserver bindCssClass(Element element, String className, 57 PathObserver bindCssClass(Element element, String className,
58 Observable object, String path) { 58 Observable object, String path) {
59 59
60 return new PathObserver(object, path)..bindSync((value) { 60 return new PathObserver(object, path)..bindSync((value) {
61 updateCssClass(element, className, value); 61 updateCssClass(element, className, value);
62 }); 62 });
63 } 63 }
OLDNEW
« no previous file with comments | « no previous file | pkg/polymer/lib/deploy.dart » ('j') | pkg/polymer/lib/deploy.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698