SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 37 | Next

Jonathan Snook, Aaron Gustafson, Stuart Langridge, and Dan Webb

"Accelerated DOM Scripting with Ajax, APIs, and Libraries"


With the current element selected in the HTML tab, you can see the applied style information
in the panel on the right (see Figure 1-5). You can even see when certain styles have
been overwritten by other styles. So as you can see, the power of Firebug extends well beyond
just JavaScript.
Figure 1-5. Selected element in Firebug
Instead of using alert statements or page logging, there are a number of hooks that Firebug
adds that enable you to log information right into the Firebug console. The one I use
most often is console.log(), which works exactly like the logger function discussed earlier,
but doesn??™t disturb the current page??”it just loads the information into the console. If you??™re
tracing an object, you can click that object in the console and inspect all the properties of
that object.
There are plenty of other features stored within Firebug, and a whole chapter could probably
be written just on the gems contained within. I??™ll leave it up to you to discover those
jewels.
HTTP Debugging
Everything you do on the Web runs over HTTP, which is the protocol that sends the packets of
information back and forth.
Particularly with Ajax calls, but also useful with any server/client interaction, you??™ll want
to see what information is actually getting sent or received. You can sometimes log this information
from the back end, but that doesn??™t always paint a true picture of what??™s happening on
the front end.


Pages:
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49