Login Register

console

firebug "console" feature on IE with Companion.JS

Hi,

I have developed an IE extension which implements the firebug "console" feature under IE : Companion.JS (http://www.my-debugbar.com/wiki/CompanionJS/HomePage) (free tool).

The "console" is implemented as a C++ object injected into the IE window object.
So using "console.log('test')" is working, but the syntax "if (console['log'])" or "if (console.log)" is not working and generates a javascript error.

A possible syntax that is working is "if ("log" in console)". The test for "window.console" is working anyway :

"if (window.console)" is working.

Firefox 2.0.0.16 cannot load parser

I have a script which loads the dojo toolkit, it does not run and generates an error in Firefox 2.0.0.16, i do not get this problem in any other browser (Firefox 3, IE6 & IE7).

my code is:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<link rel="stylesheet" type="text/css" media="screen"
href="__SITEURL__/css/site.css" />
<style type="text/css">
@import "__SITEURL__/js/dijit/themes/tundra/tundra.css";

The console and package system

I was just wondering if there are any configuration switches regarding how the console works? When I am developing a product, it is great to have all the console functionality. However, in a released product, I would like to turn off any console messages. In fact, it would be great to have an option to cut out any calls to the console as part of the package system.

Is there any way to control this, or has any thought been given to this subject?

Thanks.

Custom Dojo Build question

We know that ShrinkSafe can remove comments from code. During development I use a lot of
console.debug statements in place of alert() statements.

I noticed, however, that the dojo build script does not strip the code of
"console.debug" or any console statements for that matter.

Since I have a lot of these, I'm sure I can make my build even more compact if I have them removed.
Is there a way I can do that? Maybe I'm missing a flag that I need to pass to the build.sh script?

Thank you.

Syndicate content