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

Side by Side Diff: sky/framework/dom-serializer.sky

Issue 946813005: Port Sky widgets demo to Dart (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « sky/examples/widgets/widget-root.sky ('k') | sky/framework/sky-box.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 <!--
2 // Copyright 2015 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 -->
1 <script> 6 <script>
2 import "dart:sky"; 7 import "dart:sky";
3 8
4 final kEntityMap = new Map.fromIterable([ 9 final kEntityMap = new Map.fromIterable([
5 ['\u00a0', '&nbsp;'], 10 ['\u00a0', '&nbsp;'],
6 ['&', '&amp;'], 11 ['&', '&amp;'],
7 ['<', '&lt;'], 12 ['<', '&lt;'],
8 ['>', '&gt;'], 13 ['>', '&gt;'],
9 ['"', '&quot;'], 14 ['"', '&quot;'],
10 ], key: (item) => item[0], value: (item) => item[1]); 15 ], key: (item) => item[0], value: (item) => item[1]);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 String serializeNode(Node node, [int depth = 0]) { 90 String serializeNode(Node node, [int depth = 0]) {
86 if (node is Text) 91 if (node is Text)
87 return serializeText(node); 92 return serializeText(node);
88 if (node is Element) 93 if (node is Element)
89 return serializeElement(node, depth); 94 return serializeElement(node, depth);
90 if (node is Document || node is ShadowRoot) 95 if (node is Document || node is ShadowRoot)
91 return serializeChildren(node, depth); 96 return serializeChildren(node, depth);
92 throw new Error('Cannot serialize node'); 97 throw new Error('Cannot serialize node');
93 } 98 }
94 </script> 99 </script>
OLDNEW
« no previous file with comments | « sky/examples/widgets/widget-root.sky ('k') | sky/framework/sky-box.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698