Files
sdk/pkg/dev_compiler/lib/runtime/dart/_js_primitives.js
T
John Messerly e1c8e996b7 Replace dart_core.js with actual compiled SDK
Almost no calls are going to work at this point, but core.js can load
now and there is enough in place to continue to load sunflower.

R=sigmund@google.com

Review URL: https://codereview.chromium.org/1020043002
2015-03-20 09:41:00 -07:00

26 lines
636 B
JavaScript

var _js_primitives;
(function(exports) {
'use strict';
// Function printString: (String) → void
function printString(string) {
if (typeof dartPrint == "function") {
dartPrint(string);
return;
}
if (typeof console == "object" && typeof console.log != "undefined") {
console.log(string);
return;
}
if (typeof window == "object") {
return;
}
if (typeof print == "function") {
print(string);
return;
}
throw "Unable to print message: " + String(string);
}
// Exports:
exports.printString = printString;
})(_js_primitives || (_js_primitives = {}));