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

Side by Side Diff: examples/terminal/index.sky

Issue 1038813005: Move terminal example from //sky/examples to //examples (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « examples/terminal/README.md ('k') | examples/terminal/terminal.sky » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!mojo mojo:sky_viewer 1 #!mojo mojo:sky_viewer
2 <!-- 2 <!--
3 // Copyright 2015 The Chromium Authors. All rights reserved. 3 // Copyright 2015 The Chromium Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style license that can be 4 // Use of this source code is governed by a BSD-style license that can be
5 // found in the LICENSE file. 5 // found in the LICENSE file.
6 --> 6 -->
7 <import src="terminal.sky" /> 7 <import src="terminal.sky" />
8 <!-- 8 <!--
9 <terminal id="terminal" url="mojo:echo_terminal" /> 9 <terminal id="terminal" url="mojo:echo_terminal" />
10 --> 10 -->
11 <terminal id="terminal" /> 11 <terminal id="terminal" />
12 <script> 12 <script>
13 import 'dart:core'; 13 import 'dart:core';
14 import 'dart:sky'; 14 import 'dart:sky';
15 15
16 main () { 16 main () {
17 var terminal = document.getElementById('terminal'); 17 var terminal = document.getElementById('terminal');
18 var params = Uri.parse(document.URL).queryParameters; 18 var params = Uri.parse(document.URL).queryParameters;
19 if (params.containsKey('url')) { 19 if (params.containsKey('url')) {
20 terminal.connect(params['url']); 20 terminal.connect(params['url']);
21 } else { 21 } else {
22 terminal.putString('HALP: Add a "?url=<URL>" query.\n' 22 terminal.putString('HALP: Add a "?url=<URL>" query.\n'
23 'E.g., "?url=mojo:echo_terminal".\n'); 23 'E.g., "?url=mojo:echo_terminal".\n');
24 } 24 }
25 } 25 }
26 </script> 26 </script>
OLDNEW
« no previous file with comments | « examples/terminal/README.md ('k') | examples/terminal/terminal.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698