UNPKG

@atlassian/aui

Version:

Atlassian User Interface Framework

43 lines (38 loc) 1.12 kB
(function (global, factory) { if (typeof define === "function" && define.amd) { define([], factory); } else if (typeof exports !== "undefined") { factory(); } else { var mod = { exports: {} }; factory(); global.console = mod.exports; } })(this, function () { 'use strict'; /** * AUI-2773 * * The following shim for console is deprecated and to be removed in AUI 6. * We shouldn't be creating console.log if it doesn't exist; instead, we should avoid using it directly. * @start deprecated */ if (typeof window.console === 'undefined') { window.console = { messages: [], log: function log(text) { this.messages.push(text); }, show: function show() { alert(this.messages.join('\n')); this.messages = []; } }; } else { // Firebug console - show not required to do anything. window.console.show = function () {}; } }); //# sourceMappingURL=console.js.map