We were breaking the firebug console in Firefox 3. This change makes things less efficient for browsers without Firebug (we loop through every script checking for firebug lite), but it fixes the console with OL and Firefox 3. If you open up the console in Firefox 3 and type 'window.console' you get an error about too much recursion (nothing to do with OL). So, we avoid touching window.console unless firebug lite has defined it. r=euzuro (see #1594)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@8031 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -233,10 +233,10 @@ OpenLayers.Console = {
|
||||
* If Firebug Lite is included (before this script), re-route all
|
||||
* OpenLayers.Console calls to the console object.
|
||||
*/
|
||||
if(window.console) {
|
||||
var scripts = document.getElementsByTagName("script");
|
||||
for(var i=0, len=scripts.length; i<len; ++i) {
|
||||
if(scripts[i].src.indexOf("firebug.js") != -1) {
|
||||
var scripts = document.getElementsByTagName("script");
|
||||
for(var i=0, len=scripts.length; i<len; ++i) {
|
||||
if(scripts[i].src.indexOf("firebug.js") != -1) {
|
||||
if(console) {
|
||||
OpenLayers.Util.extend(OpenLayers.Console, console);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user