调试与输出错误日志Console.js(四)
此文件主要用来调试程序使用,使用Firebug/firebug.js脚本功能。
代码
1 (function() {
2 /**
3 * If Firebug Lite is included (before this script), re-route all
4 * OpenLayers.Console calls to the console object.
5 */
6 var scripts = document.getElementsByTagName("script");
7 for(var i=0, len=scripts.length; i<len; ++i) {
8 if(scripts[i].src.indexOf("firebug.js") != -1) {
9 if(console) {
10 OpenLayers.Util.extend(OpenLayers.Console, console);
11 break;
12 }
13 }
14 }
15 })();
2 /**
3 * If Firebug Lite is included (before this script), re-route all
4 * OpenLayers.Console calls to the console object.
5 */
6 var scripts = document.getElementsByTagName("script");
7 for(var i=0, len=scripts.length; i<len; ++i) {
8 if(scripts[i].src.indexOf("firebug.js") != -1) {
9 if(console) {
10 OpenLayers.Util.extend(OpenLayers.Console, console);
11 break;
12 }
13 }
14 }
15 })();