Changeset 13356
- Timestamp:
- 04/18/08 18:29:11 (7 months ago)
- Files:
-
- 1 modified
-
util/trunk/doh/runner.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
util/trunk/doh/runner.js
r13290 r13356 16 16 17 17 doh.selfTest = false; 18 19 doh.global = this; 18 20 19 21 doh.hitch = function(/*Object*/thisObject, /*Function|String*/method /*, ...*/){ … … 131 133 return function(){ 132 134 try{ 133 cb.apply(scope||do jo.global||_this, arguments);135 cb.apply(scope||doh.global||_this, arguments); 134 136 }catch(e){ 135 137 _this.errback(e); … … 146 148 return a[0]; 147 149 }else if(typeof a[0] == "string"){ 148 return do jo.global[a[0]];150 return doh.global[a[0]]; 149 151 } 150 152 }else if((a[0])&&(a[1])){ … … 866 868 867 869 (function(){ 868 // scop protection870 // scope protection 869 871 try{ 870 872 if(typeof dojo != "undefined"){ … … 905 907 throw new Error(); 906 908 } 909 910 if(this["document"]){ 911 // if we survived all of that, we're probably in a browser but 912 // don't have Dojo handy. Load _browserRunner.js using a 913 // document.write() call. 914 915 // find runner.js, load _browserRunner relative to it 916 var scripts = document.getElementsByTagName("script"); 917 for(var x=0; x<scripts.length; x++){ 918 var s = scripts[x].src; 919 if(s && (s.substr(-9) == "runner.js")){ 920 document.write("<scri"+"pt src='"+s.substr(0, s.length-9)+"_browserRunner.js' type='text/javascript'></scr"+"ipt>"); 921 } 922 } 923 } 907 924 } 908 925 }catch(e){