moved console polyfills to polyfills.js

This commit is contained in:
Keivan Beigi 2013-09-17 10:34:39 -07:00
parent 2a0090e5ce
commit a715b953cb
4 changed files with 12 additions and 12 deletions

View File

@ -1,14 +1,5 @@
'use strict';
(function () {
window.console = window.console || {};
window.console.log = window.console.log || function(){};
window.console.group = window.console.group || function(){};
window.console.groupEnd = window.console.groupEnd || function(){};
window.console.debug = window.console.debug || function(){};
window.console.warn = window.console.warn || function(){};
window.console.assert = window.console.assert || function(){};
window.alert = function (message) {
window.Messenger().post(message);
};

View File

@ -36,8 +36,7 @@ require.config({
init: function () {
require(
[
'jQuery/ToTheTop',
'Instrumentation/ErrorHandler'
'jQuery/ToTheTop'
]);
}

View File

@ -63,6 +63,7 @@
<script src="/polyfills.js"></script>
<script src="/JsLibraries/jquery.js"></script>
<script src="/JsLibraries/messenger.js"></script>
<script src="/Instrumentation/ErrorHandler.js"></script>
<script src="/ServerStatus.js"></script>
<script data-main="/app" src="/JsLibraries/require.js"></script>

View File

@ -1,3 +1,12 @@
window.console = window.console || {};
window.console.log = window.console.log || function(){};
window.console.group = window.console.group || function(){};
window.console.groupEnd = window.console.groupEnd || function(){};
window.console.debug = window.console.debug || function(){};
window.console.warn = window.console.warn || function(){};
window.console.assert = window.console.assert || function(){};
if (!String.prototype.startsWith) {
Object.defineProperty(String.prototype, 'startsWith', {
enumerable: false,