OLD | NEW |
| 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', ' '], | 10 ['\u00a0', ' '], |
6 ['&', '&'], | 11 ['&', '&'], |
7 ['<', '<'], | 12 ['<', '<'], |
8 ['>', '>'], | 13 ['>', '>'], |
9 ['"', '"'], | 14 ['"', '"'], |
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 Loading... |
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> |
OLD | NEW |