Understanding Firebug source

4 views
Skip to first unread message

John J Barton

unread,
Dec 27, 2006, 12:59:55 PM12/27/06
to Firebug
I've been working with the very nicely written Firebug source. Mostly
the source makes the design clear. However a few key aspects are
puzzling.

One is the meaning of the "context". Firebug uses this extensively, I
believe as a container of state per instance (like member fields in
OOP). The state can be tracked down by looking at the fields of the var
"context". But what "instance" ? I guess that a "context" represents a
FF tab, that is a web page and all of the included scripts, style file
etc.

Is it accurate to think of "context" as "page"?

John.

Joe Hewitt

unread,
Dec 28, 2006, 2:28:21 AM12/28/06
to fir...@googlegroups.com
Yes, a context represents a single web page. These objects are an
instance of Firebug.TabContext (see tabContext.js) which is a
slightly more meaningful name.

- Joe

John J Barton

unread,
Dec 29, 2006, 8:54:43 PM12/29/06
to Firebug

Just a note to others: the source code for firebug is included in the
distribution.
1) Find your Mozilla extension directory. (eg
C:\Documents and Settings\John J. Barton\Application
Data\Mozilla\Firefox\Profiles\w5tmpjcs.test\extensions\fir...@software.joehewitt.com\
2) Find firebug.jar under chrome.
3) unzip firebug.jar: there is the source.
John.

John J Barton

unread,
Dec 30, 2006, 1:06:44 AM12/30/06
to Firebug
Some notes on source code for Firebug:
http://developer.mozilla.org/en/docs/FirebugInternals

Reply all
Reply to author
Forward
0 new messages