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