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

Side by Side Diff: tools/dom/templates/html/dart2js/impl_Console.darttemplate

Issue 23889005: Cleaning up a bunch of DOM generation tables (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of $LIBRARYNAME; 5 part of $LIBRARYNAME;
6 6
7 $(ANNOTATIONS)$(CLASS_MODIFIERS)class Console { 7 $(ANNOTATIONS)$(CLASS_MODIFIERS)class Console {
8 8
9 Console._safe() {} 9 Console._safe() {}
10 10
11 static Console _safeConsole = new Console._safe(); 11 static Console _safeConsole = new Console._safe();
12 12
13 bool get _isConsoleDefined => JS('bool', 'typeof console != "undefined"'); 13 bool get _isConsoleDefined => JS('bool', 'typeof console != "undefined"');
14 14
15 @DomName('Console.memory') 15 @DomName('Console.memory')
16 MemoryInfo get memory => _isConsoleDefined ? 16 MemoryInfo get memory => _isConsoleDefined ?
17 JS('MemoryInfo', 'console.memory') : null; 17 JS('MemoryInfo', 'console.memory') : null;
18 18
19 @DomName('Console.assertCondition') 19 @DomName('Console.assertCondition')
20 void assertCondition(bool condition, Object arg) => _isConsoleDefined ? 20 void assertCondition(bool condition, Object arg) => _isConsoleDefined ?
21 JS('void', 'console.assertCondition(#, #)', condition, arg) : null; 21 JS('void', 'console.assertCondition(#, #)', condition, arg) : null;
22 22
23 @DomName('Console.clear')
24 void clear(Object arg) => _isConsoleDefined ?
25 JS('void', 'console.clear(#)', arg) : null;
26
23 @DomName('Console.count') 27 @DomName('Console.count')
24 void count(Object arg) => _isConsoleDefined ? 28 void count(Object arg) => _isConsoleDefined ?
25 JS('void', 'console.count(#)', arg) : null; 29 JS('void', 'console.count(#)', arg) : null;
26 30
27 @DomName('Console.debug') 31 @DomName('Console.debug')
28 void debug(Object arg) => _isConsoleDefined ? 32 void debug(Object arg) => _isConsoleDefined ?
29 JS('void', 'console.debug(#)', arg) : null; 33 JS('void', 'console.debug(#)', arg) : null;
30 34
31 @DomName('Console.dir') 35 @DomName('Console.dir')
32 void dir(Object arg) => _isConsoleDefined ? 36 void dir(Object arg) => _isConsoleDefined ?
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 JS('void', 'console.markTimeline(#)', arg) : null; 69 JS('void', 'console.markTimeline(#)', arg) : null;
66 70
67 @DomName('Console.profile') 71 @DomName('Console.profile')
68 void profile(String title) => _isConsoleDefined ? 72 void profile(String title) => _isConsoleDefined ?
69 JS('void', 'console.profile(#)', title) : null; 73 JS('void', 'console.profile(#)', title) : null;
70 74
71 @DomName('Console.profileEnd') 75 @DomName('Console.profileEnd')
72 void profileEnd(String title) => _isConsoleDefined ? 76 void profileEnd(String title) => _isConsoleDefined ?
73 JS('void', 'console.profileEnd(#)', title) : null; 77 JS('void', 'console.profileEnd(#)', title) : null;
74 78
79 @DomName('Console.table')
80 void table(Object arg) => _isConsoleDefined ?
81 JS('void', 'console.table(#)', arg) : null;
82
75 @DomName('Console.time') 83 @DomName('Console.time')
76 void time(String title) => _isConsoleDefined ? 84 void time(String title) => _isConsoleDefined ?
77 JS('void', 'console.time(#)', title) : null; 85 JS('void', 'console.time(#)', title) : null;
78 86
79 @DomName('Console.timeEnd') 87 @DomName('Console.timeEnd')
80 void timeEnd(String title) => _isConsoleDefined ? 88 void timeEnd(String title) => _isConsoleDefined ?
81 JS('void', 'console.timeEnd(#)', title) : null; 89 JS('void', 'console.timeEnd(#)', title) : null;
82 90
83 @DomName('Console.timeStamp') 91 @DomName('Console.timeStamp')
84 void timeStamp(Object arg) => _isConsoleDefined ? 92 void timeStamp(Object arg) => _isConsoleDefined ?
85 JS('void', 'console.timeStamp(#)', arg) : null; 93 JS('void', 'console.timeStamp(#)', arg) : null;
86 94
87 @DomName('Console.trace') 95 @DomName('Console.trace')
88 void trace(Object arg) => _isConsoleDefined ? 96 void trace(Object arg) => _isConsoleDefined ?
89 JS('void', 'console.trace(#)', arg) : null; 97 JS('void', 'console.trace(#)', arg) : null;
90 98
91 @DomName('Console.warn') 99 @DomName('Console.warn')
92 void warn(Object arg) => _isConsoleDefined ? 100 void warn(Object arg) => _isConsoleDefined ?
93 JS('void', 'console.warn(#)', arg) : null; 101 JS('void', 'console.warn(#)', arg) : null;
94 $!MEMBERS 102 $!MEMBERS
95 } 103 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698