forked from OpenNeo/impress
better console polyfill scoping
This commit is contained in:
parent
813cfbddea
commit
eede0b0718
1 changed files with 17 additions and 16 deletions
|
|
@ -1,9 +1,10 @@
|
||||||
/** @jsx React.DOM */
|
/** @jsx React.DOM */
|
||||||
|
|
||||||
|
(function($) {
|
||||||
// Console-polyfill. MIT license.
|
// Console-polyfill. MIT license.
|
||||||
// https://github.com/paulmillr/console-polyfill
|
// https://github.com/paulmillr/console-polyfill
|
||||||
// Make it safe to do console.log() always.
|
// Make it safe to do console.log() always.
|
||||||
(function (con) {
|
var console = (function (con) {
|
||||||
'use strict';
|
'use strict';
|
||||||
var prop, method;
|
var prop, method;
|
||||||
var empty = {};
|
var empty = {};
|
||||||
|
|
@ -14,9 +15,9 @@
|
||||||
'time,timeEnd,trace,warn').split(',');
|
'time,timeEnd,trace,warn').split(',');
|
||||||
while (prop = properties.pop()) con[prop] = con[prop] || empty;
|
while (prop = properties.pop()) con[prop] = con[prop] || empty;
|
||||||
while (method = methods.pop()) con[method] = con[method] || dummy;
|
while (method = methods.pop()) con[method] = con[method] || dummy;
|
||||||
})(window.console = window.console || {});
|
return con;
|
||||||
|
})(window.console || {});
|
||||||
|
|
||||||
(function($) {
|
|
||||||
var Neopia = {
|
var Neopia = {
|
||||||
User: {
|
User: {
|
||||||
get: function(id) {
|
get: function(id) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue