chore(helpers.js): add console polyfill so we can trigger warnings reliably

This commit is contained in:
Estevão Soares dos Santos 2015-05-31 13:08:15 +01:00
parent f8a81373fe
commit 678348d060

View File

@ -105,3 +105,19 @@ showdown.helper.escapeCharacters = function escapeCharacters(text, charsToEscape
return text;
};
/**
* POLYFILLS
*/
if (showdown.helper.isUndefined(console)) {
console = {
warn: function (msg) {
'use strict';
alert(msg);
},
log: function (msg) {
'use strict';
alert(msg);
}
};
}