Permalink
Browse files

Merge pull request #46 from bemjb/master

Creating console.log replaces the console object
  • Loading branch information...
2 parents be3c47a + 0813340 commit aebbf7ad683764ad76418bd40e9abad77d9e62e1 @davebalmer committed Jul 22, 2011
Showing with 11 additions and 6 deletions.
  1. +4 −2 js/core/_jo.js
  2. +4 −2 js/jo.js
  3. +3 −2 js/jo_min.js
View
@@ -117,8 +117,10 @@ if (typeof HTMLElement === 'undefined')
HTMLElement = Object;
// no console.log? sad...
-if (typeof console === 'undefined' || typeof console.log !== 'function')
- console = {log: function(msg) { }};
+if (typeof console === 'undefined')
+ console = { };
+if (typeof console.log !== 'function')
+ console.log = function(msg) { };
// just a place to hang our hat
jo = {
View
@@ -150,8 +150,10 @@ if (typeof HTMLElement === 'undefined')
HTMLElement = Object;
// no console.log? sad...
-if (typeof console === 'undefined' || typeof console.log !== 'function')
- console = {log: function(msg) { }};
+if (typeof console === 'undefined')
+ console = { };
+if (typeof console.log !== 'function')
+ console.log = function(msg) { };
// just a place to hang our hat
jo = {
View
@@ -4,8 +4,9 @@ console.log(strings.join(" "));};Function.prototype.extend=function(superclass,p
this.prototype[i]=proto[i];}};if(typeof Function.prototype.bind==='undefined'){Function.prototype.bind=function(context){var self=this;function callbind(){return self.apply(context,arguments);}
return callbind;};}
if(typeof HTMLElement==='undefined')
-HTMLElement=Object;if(typeof console==='undefined'||typeof console.log!=='function')
-console={log:function(msg){}};jo={platform:"webkit",version:"0.4.2",useragent:['ipad','iphone','playbook','webos','hpwos','bada','android','opera','chrome','safari','mozilla','gecko','explorer'],debug:false,setDebug:function(state){this.debug=state;},flag:{stopback:false},load:function(call,context){joDOM.enable();this.loadEvent=new joSubject(this);this.unloadEvent=new joSubject(this);document.body.onMouseDown=function(e){e.preventDefault();};document.body.onDragStart=function(e){e.preventDefault();};if(typeof navigator=='object'&&navigator.userAgent){var agent=navigator.userAgent.toLowerCase();for(var i=0;i<this.useragent.length;i++){if(agent.indexOf(this.useragent[i])>=0){this.platform=this.useragent[i];break;}}}
+HTMLElement=Object;if(typeof console==='undefined')
+console={};if(typeof console.log!=='function')
+console.log=function(msg){};jo={platform:"webkit",version:"0.4.2",useragent:['ipad','iphone','playbook','webos','hpwos','bada','android','opera','chrome','safari','mozilla','gecko','explorer'],debug:false,setDebug:function(state){this.debug=state;},flag:{stopback:false},load:function(call,context){joDOM.enable();this.loadEvent=new joSubject(this);this.unloadEvent=new joSubject(this);document.body.onMouseDown=function(e){e.preventDefault();};document.body.onDragStart=function(e){e.preventDefault();};if(typeof navigator=='object'&&navigator.userAgent){var agent=navigator.userAgent.toLowerCase();for(var i=0;i<this.useragent.length;i++){if(agent.indexOf(this.useragent[i])>=0){this.platform=this.useragent[i];break;}}}
if(joEvent){var o=document.createElement('div');var test=("ontouchstart"in o);if(!test){o.setAttribute("ontouchstart",'return;');test=(typeof o.ontouchstart==='function');}
joEvent.touchy=test;o=null;}
if(joGesture)

0 comments on commit aebbf7a

Please sign in to comment.