BizTalk Utilities CV ,   Jobs ,   Code library
 
Go to the front page to continue learning about XML or select below:

Contents

ReBlogger Contents

Previous posts in XML

 
 
Page 2135 of 21350

Firebug tricks, Dojo style

Blogger : Ajaxian Blog
All posts : All posts by Ajaxian Blog
Category : XML
Blogged date : 2008 Nov 11

Tom Trenka has a nice posting on Dojo and Firebug Tricks for Development where he shares two of his own:

Trick #1: using window.location.search to enable Firebug Lite on the fly

With the Dojo Toolkit, I find this trick indispensable. The basic concept is to use the original version of the djConfig variable—the object-based one—using a boolean to enable or disable debugging.

In a single line of code, here’s the trick:

JAVASCRIPT:
  1.  
  2. var djConfig = { isDebug: (window.location.search.indexOf("debug")>-1) };
  3.  

Trick #2: setting up a simple HTML file that just enables the console

Once you drop in the simple HTML file below, you can bookmark it, load up your Dojo world, and then start to use Firebugs "Run" command to access Dojo-ness.

Start with this:

HTML:
  1.  
  2.        
  3.                 type="text/javascript"
  4.                       src="dojo/dojo.js" djConfig="isDebug: true">
  5.                
  6.        
  7.        
  8.                

  9.                      This is a quick and dirty file you can use
  10.                      to do console-based development.
  11.                

  12.        
  13.  

And then "Run" something like this:

JAVASCRIPT:
  1.  
  2. dojo.require("dojox.xml.DomParser");
  3.  
  4. var xml=''
  5.     + 'My first node'
  6.     + 'My second node'
  7.     + '';
  8. var doc=dojox.xml.DomParser.parse(xml);
  9. console.log(doc);
  10.  

What tips and tricks do you have?


Read comments or post a reply to : Firebug tricks, Dojo style
Page 2135 of 21350

Newest posts
 

    Email TopXML