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

Unified Diff: example/streams/mouse_move.html

Issue 17553018: Initial stream support (Closed) Base URL: https://github.com/dart-lang/fancy-syntax.git@master
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: example/streams/mouse_move.html
diff --git a/example/streams/mouse_move.html b/example/streams/mouse_move.html
new file mode 100644
index 0000000000000000000000000000000000000000..6b438305cea8bfa2462b942d679c2146f524844e
--- /dev/null
+++ b/example/streams/mouse_move.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012, 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.
+-->
+
+<html>
+ <body>
+ <template id="test" bind="{{ mouse }}" syntax="fancy">
+ ({{ value.offsetX }}, {{ value.offsetY }})
+ </template>
+ <script type="application/dart">
+ import 'dart:html';
+ import 'package:fancy_syntax/syntax.dart';
+
+ main() {
+ var globals = {
+ 'mouse': document.onMouseMove,
+ };
+
+ TemplateElement.syntax['fancy'] = new FancySyntax(globals: globals);
+
+ query('#test').model = null;
+ }
+ </script>
+ <script src="packages/browser/dart.js"></script>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698