OLD | NEW |
1 var _js_primitives = dart.defineLibrary(_js_primitives, {}); | 1 dart.defineLibrary('_js_primitives'); |
2 var core = dart.import(core); | 2 dart.import('core'); |
3 (function(exports, core) { | 3 (function(exports, core) { |
4 'use strict'; | 4 'use strict'; |
5 function printString(string) { | 5 function printString(string) { |
6 if (typeof dartPrint == "function") { | 6 if (typeof dartPrint == "function") { |
7 dartPrint(string); | 7 dartPrint(string); |
8 return; | 8 return; |
9 } | 9 } |
10 if (typeof console == "object" && typeof console.log != "undefined") { | 10 if (typeof console == "object" && typeof console.log != "undefined") { |
11 console.log(string); | 11 console.log(string); |
12 return; | 12 return; |
13 } | 13 } |
14 if (typeof window == "object") { | 14 if (typeof window == "object") { |
15 return; | 15 return; |
16 } | 16 } |
17 if (typeof print == "function") { | 17 if (typeof print == "function") { |
18 print(string); | 18 print(string); |
19 return; | 19 return; |
20 } | 20 } |
21 throw "Unable to print message: " + String(string); | 21 throw "Unable to print message: " + String(string); |
22 } | 22 } |
23 dart.fn(printString, dart.void, [core.String]); | 23 dart.fn(printString, dart.void, [core.String]); |
24 // Exports: | 24 // Exports: |
25 exports.printString = printString; | 25 exports.printString = printString; |
26 })(_js_primitives, core); | 26 })(_js_primitives, core); |
OLD | NEW |