flymis/WebRoot/dojojs/src/debug.js
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
Copyright (c) 2004-2006, The Dojo Foundation
All Rights Reserved.
Licensed under the Academic Free License version 2.1 or above OR the
modified BSD license. For more information on Dojo licensing, see:
http://dojotoolkit.org/community/licensing.shtml
*/
dojo.debug = function(/*...*/){
// summary:
// Produce a line of debug output. Does nothing unless
// djConfig.isDebug is true. Accepts any nubmer of args, joined with
// '' to produce a single line of debugging output. Caller should not
// supply a trailing "\n".
if (!djConfig.isDebug) { return; }
var args = arguments;
if(dj_undef("println", dojo.hostenv)){
dojo.raise("dojo.debug not available (yet?)");
}
var isJUM = dj_global["jum"] && !dj_global["jum"].isBrowser;
var s = [(isJUM ? "": "DEBUG: ")];
for(var i=0;i<args.length;++i){
if(!false && args[i] && args[i] instanceof Error){
var msg = "[" + args[i].name + ": " + dojo.errorToString(args[i]) +
(args[i].fileName ? ", file: " + args[i].fileName : "") +
(args[i].lineNumber ? ", line: " + args[i].lineNumber : "") + "]";
} else {
try {
var msg = String(args[i]);
} catch(e) {
if(dojo.render.html.ie) {
var msg = "[ActiveXObject]";
} else {
var msg = "[unknown]";
}
}
}
s.push(msg);
}
dojo.hostenv.println(s.join(" "));
}
/**
* this is really hacky for now - just
* display the properties of the object
**/
dojo.debugShallow = function(/*Object*/obj){
// summary:
// outputs a "name: value" style listing of all enumerable properties
// in obj. Does nothing if djConfig.isDebug == false.
// obj: the object to be enumerated
if (!djConfig.isDebug) { return; }
dojo.debug('------------------------------------------------------------');
dojo.debug('Object: '+obj);
var props = [];
for(var prop in obj){
后面还有 31 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。