Ticket #627: bootstrapRefactor.patch
| File bootstrapRefactor.patch, 76.3 kB (added by jburke, 3 years ago) |
|---|
-
src/text/Text.js
1 d j_deprecated("dojo.text.Text is being replaced by dojo.string");1 dojo.deprecated("dojo.text.Text is being replaced by dojo.string"); 2 2 dojo.require("dojo.string"); 3 3 4 4 dojo.text = dojo.string; -
src/text/Builder.js
1 1 dojo.provide("dojo.text.Builder"); 2 2 dojo.require("dojo.string.Builder"); 3 3 4 d j_deprecated("dojo.text.Builder is deprecated, use dojo.string.Builder instead");4 dojo.deprecated("dojo.text.Builder is deprecated, use dojo.string.Builder instead"); 5 5 6 6 dojo.text.Builder = dojo.string.Builder; -
src/text/String.js
1 d j_deprecated("dojo.text.String is being replaced by dojo.string");1 dojo.deprecated("dojo.text.String is being replaced by dojo.string"); 2 2 dojo.require("dojo.string"); 3 3 4 4 dojo.text = dojo.string; -
src/hostenv_rhino.js
10 10 @*/ 11 11 12 12 // TODO: not sure what we gain from the next line, anyone? 13 //if (typeof loadClass == 'undefined') { d j_throw("attempt to use Rhino host environment when no 'loadClass' global"); }13 //if (typeof loadClass == 'undefined') { dojo.raise("attempt to use Rhino host environment when no 'loadClass' global"); } 14 14 15 15 dojo.render.name = dojo.hostenv.name_ = 'rhino'; 16 16 dojo.hostenv.getVersion = function() {return version()}; … … 101 101 // do it by using java java.lang.Exception 102 102 function dj_rhino_current_script_via_java(depth) { 103 103 var optLevel = Packages.org.mozilla.javascript.Context.getCurrentContext().getOptimizationLevel(); 104 if (optLevel == -1) d j_unimplemented("getCurrentScriptURI (determine current script path for rhino when interpreter mode)", '');104 if (optLevel == -1) dojo.unimplemented("getCurrentScriptURI (determine current script path for rhino when interpreter mode)", ''); 105 105 var caw = new java.io.CharArrayWriter(); 106 106 var pw = new java.io.PrintWriter(caw); 107 107 var exc = new java.lang.Exception(); -
src/hostenv_jsc.js
9 9 // See the Rotor source code jscript/engine/globalobject.cs for what globals 10 10 // are available. 11 11 if((typeof ScriptEngineMajorVersion != 'function')||(ScriptEngineMajorVersion() < 7)){ 12 d j_throw("attempt to use JScript .NET host environment with inappropriate ScriptEngine");12 dojo.raise("attempt to use JScript .NET host environment with inappropriate ScriptEngine"); 13 13 } 14 14 15 15 // for more than you wanted to know about why this import is required even if … … 19 19 20 20 dojo.hostenv.getText = function(uri){ 21 21 if(!System.IO.File.Exists(uri)){ 22 // d j_throw("No such file '" + uri + "'");22 // dojo.raise("No such file '" + uri + "'"); 23 23 return 0; 24 24 } 25 25 var reader = new System.IO.StreamReader(uri); … … 30 30 dojo.hostenv.loadUri = function(uri){ 31 31 var contents = this.getText(uri); 32 32 if(!contents){ 33 d j_throw("got no back contents from uri '" + uri + "': " + contents);33 dojo.raise("got no back contents from uri '" + uri + "': " + contents); 34 34 } 35 35 // TODO: in JScript .NET, eval will not affect the symbol table of the current code? 36 36 var value = dj_eval(contents); -
src/browser_debug.js
1 1 dojo.hostenv.loadedUris.push("../src/bootstrap1.js"); 2 dojo.hostenv.loadedUris.push("../src/bootstrap2.js"); 2 3 dojo.hostenv.loadedUris.push("../src/hostenv_browser.js"); 3 dojo.hostenv.loadedUris.push("../src/bootstrap2.js");4 4 5 5 function removeComments(contents){ 6 6 contents = new String((!contents) ? "" : contents); … … 14 14 dojo.hostenv.getRequiresAndProvides = function(contents){ 15 15 // FIXME: should probably memoize this! 16 16 if(!contents){ return []; } 17 17 18 18 19 // check to see if we need to load anything else first. Ugg. 19 20 var deps = []; 20 21 var tmp; 21 22 RegExp.lastIndex = 0; 22 var testExp = /dojo.(hostenv.loadModule|hosetnv.require|require|requireIf|hostenv.conditionalLoadModule|hostenv.startPackage| hostenv.provide|provide)\([\w\W]*?\)/mg;23 var testExp = /dojo.(hostenv.loadModule|hosetnv.require|require|requireIf|hostenv.conditionalLoadModule|hostenv.startPackage|provide)\([\w\W]*?\)/mg; 23 24 while((tmp = testExp.exec(contents)) != null){ 24 25 deps.push(tmp[0]); 25 26 } … … 34 35 var deps = []; 35 36 var tmp; 36 37 RegExp.lastIndex = 0; 37 var testExp = /dojo.(requireAfterIf|require After)\([\w\W]*?\)/mg;38 var testExp = /dojo.(requireAfterIf|requireIf)\([\w\W]*?\)/mg; 38 39 while((tmp = testExp.exec(contents)) != null){ 39 40 deps.push(tmp[0]); 40 41 } -
src/bootstrap2.js
1 1 /* 2 * bootstrap2.js - runs after the hostenv_*.js file.2 * bootstrap2.js - runs before the hostenv_*.js file. Contains all of the package loading methods. 3 3 */ 4 4 5 //Additional properties for dojo.hostenv 6 var _addHostEnv = { 7 pkgFileName: "__package__", 8 9 // for recursion protection 10 loading_modules_: {}, 11 loaded_modules_: {}, 12 addedToLoadingCount: [], 13 removedFromLoadingCount: [], 14 15 inFlightCount: 0, 16 17 // FIXME: it should be possible to pull module prefixes in from djConfig 18 modulePrefixes_: { 19 dojo: {name: "dojo", value: "src"} 20 }, 21 22 23 setModulePrefix: function(module, prefix){ 24 this.modulePrefixes_[module] = {name: module, value: prefix}; 25 }, 26 27 getModulePrefix: function(module){ 28 var mp = this.modulePrefixes_; 29 if((mp[module])&&(mp[module]["name"])){ 30 return mp[module].value; 31 } 32 return module; 33 }, 34 35 getTextStack: [], 36 loadUriStack: [], 37 loadedUris: [], 38 39 //WARNING: This variable is referenced by packages outside of bootstrap: FloatingPane.js and undo/browser.js 40 post_load_: false, 41 42 //Egad! Lots of test files push on this directly instead of using dojo.addOnLoad. 43 modulesLoadedListeners: [], 44 } 45 46 //Add all of these properties to dojo.hostenv 47 for(var param in _addHostEnv){ 48 dojo.hostenv[param] = _addHostEnv[param]; 49 } 50 51 /** 52 * Loads and interprets the script located at relpath, which is relative to the 53 * script root directory. If the script is found but its interpretation causes 54 * a runtime exception, that exception is not caught by us, so the caller will 55 * see it. We return a true value if and only if the script is found. 56 * 57 * For now, we do not have an implementation of a true search path. We 58 * consider only the single base script uri, as returned by getBaseScriptUri(). 59 * 60 * @param relpath A relative path to a script (no leading '/', and typically 61 * ending in '.js'). 62 * @param module A module whose existance to check for after loading a path. 63 * Can be used to determine success or failure of the load. 64 */ 65 dojo.hostenv.loadPath = function(relpath, module /*optional*/, cb /*optional*/){ 66 if((relpath.charAt(0) == '/')||(relpath.match(/^\w+:/))){ 67 dojo.raise("relpath '" + relpath + "'; must be relative"); 68 } 69 var uri = this.getBaseScriptUri() + relpath; 70 if(djConfig.cacheBust && dojo.render.html.capable) { uri += "?" + String(djConfig.cacheBust).replace(/\W+/g,""); } 71 try{ 72 return ((!module) ? this.loadUri(uri, cb) : this.loadUriAndCheck(uri, module, cb)); 73 }catch(e){ 74 dojo.debug(e); 75 return false; 76 } 77 } 78 79 /** 80 * Reads the contents of the URI, and evaluates the contents. 81 * Returns true if it succeeded. Returns false if the URI reading failed. 82 * Throws if the evaluation throws. 83 * The result of the eval is not available to the caller. 84 */ 85 dojo.hostenv.loadUri = function(uri, cb){ 86 if(this.loadedUris[uri]){ 87 return; 88 } 89 var contents = this.getText(uri, null, true); 90 if(contents == null){ return 0; } 91 this.loadedUris[uri] = true; 92 var value = dj_eval(contents); 93 return 1; 94 } 95 96 // FIXME: probably need to add logging to this method 97 dojo.hostenv.loadUriAndCheck = function(uri, module, cb){ 98 var ok = true; 99 try{ 100 ok = this.loadUri(uri, cb); 101 }catch(e){ 102 dojo.debug("failed loading ", uri, " with error: ", e); 103 } 104 return ((ok)&&(this.findModule(module, false))) ? true : false; 105 } 106 107 dojo.loaded = function(){ } 108 109 dojo.hostenv.loaded = function(){ 110 this.post_load_ = true; 111 var mll = this.modulesLoadedListeners; 112 for(var x=0; x<mll.length; x++){ 113 mll[x](); 114 } 115 dojo.loaded(); 116 } 117 5 118 /* 119 Call styles: 120 dojo.addOnLoad(functionPointer) 121 dojo.addOnLoad(object, "functionName") 122 */ 123 dojo.addOnLoad = function(obj, fcnName) { 124 if(arguments.length == 1) { 125 dojo.hostenv.modulesLoadedListeners.push(obj); 126 } else if(arguments.length > 1) { 127 dojo.hostenv.modulesLoadedListeners.push(function() { 128 obj[fcnName](); 129 }); 130 } 131 } 132 133 dojo.hostenv.modulesLoaded = function(){ 134 if(this.post_load_){ return; } 135 if((this.loadUriStack.length==0)&&(this.getTextStack.length==0)){ 136 if(this.inFlightCount > 0){ 137 dojo.debug("files still in flight!"); 138 return; 139 } 140 if(typeof setTimeout == "object"){ 141 setTimeout("dojo.hostenv.loaded();", 0); 142 }else{ 143 dojo.hostenv.loaded(); 144 } 145 } 146 } 147 148 dojo.hostenv.moduleLoaded = function(modulename){ 149 var modref = dojo.evalObjPath((modulename.split(".").slice(0, -1)).join('.')); 150 this.loaded_modules_[(new String(modulename)).toLowerCase()] = modref; 151 } 152 153 /** 154 * loadModule("A.B") first checks to see if symbol A.B is defined. 155 * If it is, it is simply returned (nothing to do). 156 * 157 * If it is not defined, it will look for "A/B.js" in the script root directory, 158 * followed by "A.js". 159 * 160 * It throws if it cannot find a file to load, or if the symbol A.B is not 161 * defined after loading. 162 * 163 * It returns the object A.B. 164 * 165 * This does nothing about importing symbols into the current package. 166 * It is presumed that the caller will take care of that. For example, to import 167 * all symbols: 168 * 169 * with (dojo.hostenv.loadModule("A.B")) { 170 * ... 171 * } 172 * 173 * And to import just the leaf symbol: 174 * 175 * var B = dojo.hostenv.loadModule("A.B"); 176 * ... 177 * 178 * dj_load is an alias for dojo.hostenv.loadModule 179 */ 180 dojo.hostenv._global_omit_module_check = false; 181 dojo.hostenv.loadModule = function(modulename, exact_only, omit_module_check){ 182 if(!modulename){ return; } 183 omit_module_check = this._global_omit_module_check || omit_module_check; 184 var module = this.findModule(modulename, false); 185 if(module){ 186 return module; 187 } 188 189 // protect against infinite recursion from mutual dependencies 190 if(dj_undef(modulename, this.loading_modules_)){ 191 this.addedToLoadingCount.push(modulename); 192 } 193 this.loading_modules_[modulename] = 1; 194 195 // convert periods to slashes 196 var relpath = modulename.replace(/\./g, '/') + '.js'; 197 198 var syms = modulename.split("."); 199 var nsyms = modulename.split("."); 200 for (var i = syms.length - 1; i > 0; i--) { 201 var parentModule = syms.slice(0, i).join("."); 202 var parentModulePath = this.getModulePrefix(parentModule); 203 if (parentModulePath != parentModule) { 204 syms.splice(0, i, parentModulePath); 205 break; 206 } 207 } 208 var last = syms[syms.length - 1]; 209 // figure out if we're looking for a full package, if so, we want to do 210 // things slightly diffrently 211 if(last=="*"){ 212 modulename = (nsyms.slice(0, -1)).join('.'); 213 214 while(syms.length){ 215 syms.pop(); 216 syms.push(this.pkgFileName); 217 relpath = syms.join("/") + '.js'; 218 if(relpath.charAt(0)=="/"){ 219 relpath = relpath.slice(1); 220 } 221 ok = this.loadPath(relpath, ((!omit_module_check) ? modulename : null)); 222 if(ok){ break; } 223 syms.pop(); 224 } 225 }else{ 226 relpath = syms.join("/") + '.js'; 227 modulename = nsyms.join('.'); 228 var ok = this.loadPath(relpath, ((!omit_module_check) ? modulename : null)); 229 if((!ok)&&(!exact_only)){ 230 syms.pop(); 231 while(syms.length){ 232 relpath = syms.join('/') + '.js'; 233 ok = this.loadPath(relpath, ((!omit_module_check) ? modulename : null)); 234 if(ok){ break; } 235 syms.pop(); 236 relpath = syms.join('/') + '/'+this.pkgFileName+'.js'; 237 if(relpath.charAt(0)=="/"){ 238 relpath = relpath.slice(1); 239 } 240 ok = this.loadPath(relpath, ((!omit_module_check) ? modulename : null)); 241 if(ok){ break; } 242 } 243 } 244 245 if((!ok)&&(!omit_module_check)){ 246 dojo.raise("Could not load '" + modulename + "'; last tried '" + relpath + "'"); 247 } 248 } 249 250 // check that the symbol was defined 251 if(!omit_module_check){ 252 // pass in false so we can give better error 253 module = this.findModule(modulename, false); 254 if(!module){ 255 dojo.raise("symbol '" + modulename + "' is not defined after loading '" + relpath + "'"); 256 } 257 } 258 259 return module; 260 } 261 262 /** 263 * startPackage("A.B") follows the path, and at each level creates a new empty 264 * object or uses what already exists. It returns the result. 265 */ 266 dojo.hostenv.startPackage = function(packname){ 267 var syms = packname.split(/\./); 268 if(syms[syms.length-1]=="*"){ 269 syms.pop(); 270 } 271 return dojo.evalObjPath(syms.join("."), true); 272 } 273 274 /** 275 * findModule("A.B") returns the object A.B if it exists, otherwise null. 276 * @param modulename A string like 'A.B'. 277 * @param must_exist Optional, defualt false. throw instead of returning null 278 * if the module does not currently exist. 279 */ 280 dojo.hostenv.findModule = function(modulename, must_exist){ 281 // check cache 282 /* 283 if(!dj_undef(modulename, this.modules_)){ 284 return this.modules_[modulename]; 285 } 286 */ 287 288 var lmn = (new String(modulename)).toLowerCase(); 289 290 if(this.loaded_modules_[lmn]){ 291 return this.loaded_modules_[lmn]; 292 } 293 294 // see if symbol is defined anyway 295 var module = dojo.evalObjPath(modulename); 296 if((modulename)&&(typeof module != 'undefined')&&(module)){ 297 this.loaded_modules_[lmn] = module; 298 return module; 299 } 300 301 if(must_exist){ 302 dojo.raise("no loaded module named '" + modulename + "'"); 303 } 304 return null; 305 } 306 307 //Start of old bootstrap2: 308 309 /* 6 310 * This method taks a "map" of arrays which one can use to optionally load dojo 7 311 * modules. The map is indexed by the possible dojo.hostenv.name_ values, with 8 312 * two additional values: "default" and "common". The items in the "default" … … 35 339 } 36 340 } 37 341 38 dojo.hostenv.require = dojo.hostenv.loadModule;39 342 dojo.require = function(){ 40 343 dojo.hostenv.loadModule.apply(dojo.hostenv, arguments); 41 344 } 42 dojo.requireAfter = dojo.require;43 345 44 346 dojo.requireIf = function(){ 45 347 if((arguments[0] === true)||(arguments[0]=="common")||(arguments[0] && dojo.render[arguments[0]].capable)){ … … 49 351 } 50 352 } 51 353 354 //Would like to remove requireAfterIf, but would too many widgets 355 //outside of dojo use it? Since the dojo widgets used to, and outside 356 //widgets may have done copy/paste from them to start the widget. 52 357 dojo.requireAfterIf = dojo.requireIf; 53 dojo.conditionalRequire = dojo.requireIf;54 358 55 dojo.requireAll = function() {56 for(var i = 0; i < arguments.length; i++) { dojo.require(arguments[i]); }57 }58 59 dojo.kwCompoundRequire = function(){60 dojo.hostenv.conditionalLoadModule.apply(dojo.hostenv, arguments);61 }62 63 dojo.hostenv.provide = dojo.hostenv.startPackage;64 359 dojo.provide = function(){ 65 360 return dojo.hostenv.startPackage.apply(dojo.hostenv, arguments); 66 361 } … … 69 364 return dojo.hostenv.setModulePrefix(module, prefix); 70 365 } 71 366 72 // stub73 dojo.profile = { start: function(){}, end: function(){}, stop: function(){}, dump: function(){} };74 75 367 // determine if an object supports a given method 76 368 // useful for longer api chains where you have to test each object in the chain 77 369 dojo.exists = function(obj, name){ -
src/lang/Lang.js
1 1 dojo.require("dojo.lang"); 2 d j_deprecated("dojo.lang.Lang is deprecated, use dojo.lang instead");2 dojo.deprecated("dojo.lang.Lang is deprecated, use dojo.lang instead"); -
src/hostenv_wsh.js
13 13 14 14 // make sure we are in right environment 15 15 if(typeof WScript == 'undefined'){ 16 d j_throw("attempt to use WSH host environment when no WScript global");16 dojo.raise("attempt to use WSH host environment when no WScript global"); 17 17 } 18 18 19 19 dojo.hostenv.println = WScript.Echo; -
src/reflect/__package__.js
1 d j_deprecated("dojo.reflect is merged into dojo.lang (dojo.lang[type]). Will be removed by 0.4");1 dojo.deprecated("dojo.reflect is merged into dojo.lang (dojo.lang[type]). Will be removed by 0.4"); 2 2 dojo.hostenv.conditionalLoadModule({ 3 3 common: ["dojo.reflect.reflection"] 4 4 }); -
src/reflect/reflection.js
1 d j_deprecated("dojo.reflect is merged into dojo.lang (dojo.lang[type]). Will be removed by 0.4");1 dojo.deprecated("dojo.reflect is merged into dojo.lang (dojo.lang[type]). Will be removed by 0.4"); 2 2 dojo.provide("dojo.reflect"); 3 3 4 4 /***************************************************************** -
src/graphics/htmlEffects.js
1 1 dojo.provide("dojo.graphics.htmlEffects"); 2 2 dojo.require("dojo.fx.*"); 3 3 4 d j_deprecated("dojo.graphics.htmlEffects is deprecated, use dojo.fx.html instead");4 dojo.deprecated("dojo.graphics.htmlEffects is deprecated, use dojo.fx.html instead"); 5 5 6 6 dojo.graphics.htmlEffects = dojo.fx.html; -
src/hostenv_browser.js
34 34 } 35 35 } 36 36 37 if(((djConfig["baseScriptUri"] == "")||(djConfig["baseRelativePath"] == "")) &&(document && document.getElementsByTagName)){38 var scripts = document.getElementsByTagName("script");39 var rePkg = /(__package__|dojo|bootstrap1)\.js([\?\.]|$)/i;40 for(var i = 0; i < scripts.length; i++) {41 var src = scripts[i].getAttribute("src");42 if(!src) { continue; }43 var m = src.match(rePkg);44 if(m) {45 root = src.substring(0, m.index);46 if(src.indexOf("bootstrap1") > -1) { root += "../"; }47 if(!this["djConfig"]) { djConfig = {}; }48 if(djConfig["baseScriptUri"] == "") { djConfig["baseScriptUri"] = root; }49 if(djConfig["baseRelativePath"] == "") { djConfig["baseRelativePath"] = root; }50 break;51 }52 }53 }54 55 37 // fill in the rendering support information in dojo.render.* 56 38 var dr = dojo.render; 57 39 var drh = dojo.render.html; … … 373 355 // breaking when it's not included 374 356 dojo.hostenv.writeIncludes = function(){} 375 357 376 dojo. hostenv.byId = dojo.byId = function(id, doc){358 dojo.byId = function(id, doc){ 377 359 if(id && (typeof id == "string" || id instanceof String)){ 378 360 if(!doc){ doc = document; } 379 361 return doc.getElementById(id); 380 362 } 381 363 return id; // assume it's a node 382 364 } 383 384 dojo.hostenv.byIdArray = dojo.byIdArray = function(){385 var ids = [];386 for(var i = 0; i < arguments.length; i++){387 if((arguments[i] instanceof Array)||(typeof arguments[i] == "array")){388 for(var j = 0; j < arguments[i].length; j++){389 ids = ids.concat(dojo.hostenv.byIdArray(arguments[i][j]));390 }391 }else{392 ids.push(dojo.hostenv.byId(arguments[i]));393 }394 }395 return ids;396 } -
src/bootstrap1.js
122 122 throw Error(message); 123 123 } 124 124 125 dj_throw = dj_rethrow = function(m, e){ 126 dojo.deprecated("dj_throw and dj_rethrow deprecated, use dojo.raise instead"); 127 dojo.raise(m, e); 128 } 125 //Stub functions so things don't break. 126 dojo.debug = function(){} 127 dojo.debugShallow = function(obj){} 128 dojo.profile = { start: function(){}, end: function(){}, stop: function(){}, dump: function(){} }; 129 129 130 130 /** 131 * Produce a line of debug output.132 * Does nothing unless djConfig.isDebug is true.133 * varargs, joined with ''.134 * Caller should not supply a trailing "\n".135 */136 dojo.debug = function(){137 if (!djConfig.isDebug) { return; }138 var args = arguments;139 if(dj_undef("println", dojo.hostenv)){140 dojo.raise("dojo.debug not available (yet?)");141 }142 var isJUM = dj_global["jum"] && !dj_global["jum"].isBrowser;143 var s = [(isJUM ? "": "DEBUG: ")];144 for(var i=0;i<args.length;++i){145 if(!false && args[i] instanceof Error){146 var msg = "[" + args[i].name + ": " + dojo.errorToString(args[i]) +147 (args[i].fileName ? ", file: " + args[i].fileName : "") +148 (args[i].lineNumber ? ", line: " + args[i].lineNumber : "") + "]";149 } else {150 try {151 var msg = String(args[i]);152 } catch(e) {153 if(dojo.render.html.ie) {154 var msg = "[ActiveXObject]";155 } else {156 var msg = "[unknown]";157 }158 }159 }160 s.push(msg);161 }162 if(isJUM){ // this seems to be the only way to get JUM to "play nice"163 jum.debug(s.join(" "));164 }else{165 dojo.hostenv.println(s.join(" "));166 }167 }168 169 /**170 * this is really hacky for now - just171 * display the properties of the object172 **/173 174 dojo.debugShallow = function(obj){175 if (!djConfig.isDebug) { return; }176 dojo.debug('------------------------------------------------------------');177 dojo.debug('Object: '+obj);178 var props = [];179 for(var prop in obj){180 try {181 props.push(prop + ': ' + obj[prop]);182 } catch(E) {183 props.push(prop + ': ERROR - ' + E.message);184 }185 }186 props.sort();187 for(var i = 0; i < props.length; i++) {188 dojo.debug(props[i]);189 }190 dojo.debug('------------------------------------------------------------');191 }192 193 var dj_debug = dojo.debug;194 195 /**196 131 * We put eval() in this separate function to keep down the size of the trapped 197 132 * evaluation context. 198 133 * … … 208 143 * Convenience for throwing an exception because some function is not 209 144 * implemented. 210 145 */ 211 d j_unimplemented = dojo.unimplemented = function(funcname, extra){146 dojo.unimplemented = function(funcname, extra){ 212 147 // FIXME: need to move this away from dj_* 213 148 var mess = "'" + funcname + "' not implemented"; 214 149 if((!dj_undef(extra))&&(extra)){ mess += " " + extra; } … … 218 153 /** 219 154 * Convenience for informing of deprecated behaviour. 220 155 */ 221 d j_deprecated = dojo.deprecated = function(behaviour, extra, removal){156 dojo.deprecated = function(behaviour, extra, removal){ 222 157 var mess = "DEPRECATED: " + behaviour; 223 158 if(extra){ mess += " " + extra; } 224 159 if(removal){ mess += " -- will be removed in version: " + removal; } … … 226 161 } 227 162 228 163 /** 229 * Convenience for informing of experimental code.230 */231 dojo.experimental = function(packageName, extra){232 var mess = "EXPERIMENTAL: " + packageName;233 mess += " -- Not yet ready for use. APIs subject to change without notice.";234 if(extra){ mess += " " + extra; }235 dojo.debug(mess);236 }237 238 /**239 164 * Does inheritance 240 165 */ 241 166 dojo.inherits = function(subclass, superclass){ … … 249 174 subclass['super'] = superclass.prototype; 250 175 } 251 176 252 dj_inherits = function(subclass, superclass){253 dojo.deprecated("dj_inherits deprecated, use dojo.inherits instead");254 dojo.inherits(subclass, superclass);255 }256 257 177 // an object that authors use determine what host we are running under 258 178 dojo.render = (function(){ 259 179 … … 321 241 } 322 242 } 323 243 324 var djc = djConfig;325 function _def(obj, name, def){326 return (dj_undef(name, obj) ? def : obj[name]);327 }328 329 244 return {