| OLD | NEW |
| (Empty) | |
| 1 part of angular.mock; |
| 2 |
| 3 String depth = ''; |
| 4 |
| 5 ENTER(name) { |
| 6 dump('${depth}ENTER: $name'); |
| 7 depth = depth + ' '; |
| 8 } |
| 9 |
| 10 LEAVE(name) { |
| 11 depth = depth.substring(0, depth.length -2); |
| 12 dump('${depth}LEAVE: $name'); |
| 13 } |
| 14 |
| 15 MARK(name) { |
| 16 dump('$depth$name'); |
| 17 } |
| 18 |
| 19 |
| 20 dump([p1, p2, p3, p4, p5, p6, p7, p8, p9, p10]) { |
| 21 var log = []; |
| 22 if (p1 != null) log.add(STRINGIFY(p1)); |
| 23 if (p2 != null) log.add(STRINGIFY(p2)); |
| 24 if (p3 != null) log.add(STRINGIFY(p3)); |
| 25 if (p4 != null) log.add(STRINGIFY(p4)); |
| 26 if (p5 != null) log.add(STRINGIFY(p5)); |
| 27 if (p6 != null) log.add(STRINGIFY(p6)); |
| 28 if (p7 != null) log.add(STRINGIFY(p7)); |
| 29 if (p8 != null) log.add(STRINGIFY(p8)); |
| 30 if (p9 != null) log.add(STRINGIFY(p9)); |
| 31 if (p10 != null) log.add(STRINGIFY(p10)); |
| 32 (js.context as dynamic).console.log(log.join(', ')); |
| 33 } |
| 34 |
| 35 STRINGIFY(obj) { |
| 36 if (obj is List) { |
| 37 var out = []; |
| 38 obj.forEach((i) => out.add(STRINGIFY(i))); |
| 39 return '[${out.join(", ")}]'; |
| 40 } else if (obj is Comment) { |
| 41 return '<!--${obj.text}-->'; |
| 42 } else if (obj is Element) { |
| 43 return obj.outerHtml; |
| 44 } else if (obj is String) { |
| 45 return '"$obj"'; |
| 46 } else { |
| 47 return obj.toString(); |
| 48 } |
| 49 } |
| OLD | NEW |