On Nov 25, 5:36 pm, John J Barton <
johnjbar...@johnjbarton.com> wrote:
> On Nov 25, 5:11 pm, Manoj <
kawi...@gmail.com> wrote:
>
> > Your suggestion works like a charm.
>
> > Is it appropriate to use context.uid as the key to associate all the
> > data (network/DOM/JS).
>
> No, context.uid is just a sanity check for when I'm confused about
> contexts. For example the contextUID appears in the panelNode in
> chromebug.
>
> > In that case, how do I map the initial request (root document) into
> > the appropriate firebug context. This is because, the first time, I
> > try to get the context in observe() using:
>
> > var win = getWindowForRequest(subject);
> > var context = TabWatcher.getContextByWindow(win);
>
> > starting with about:blank, the first navigation results in context
> > being null.
>
> I'm not sure what you mean by starting with about:blank.
> Do you see the initContent in the trace? If you issue
> FBTrace.sysout(..);
My development profile has the start page option set as "Show a blank
page" (Tools->Options->Main)
When FF starts here is the trace:
FTS0: Registered: object Firebug.myModule
FTS0: Registered: function myPanel() {
}
FTS0: INSIDE myModule.initialize()
FTS0: INSIDE myModule.initializeUI()
No context is initialized.
Then if I initiate navigation to a URL (test_1.html for e.g.)
FTS0: onModifyRequest() *** NO CONTEXT *** context=undefined
uri=http://.../test_1.html
FTS0: INSIDE myModule.initContext() context=(39138) uri=http://.../
test_1.html persistedState = null
FTS0: INSIDE myModule.watchWindow() context=(39138)
FTS0: INSIDE myModule.loadedContext() context=(39138)
FTS0: INSIDE myModule.showContext() context=(39138)
Then if I initiate navigation to another URL (test_2.html for e.g.)
FTS0: onModifyRequest() context=(39138) uri=http://.../test_2.html
FTS0: INSIDE myModule.unwatchWindow() context=(39138)
FTS0: INSIDE myModule.destroyContext() context=(39138)
FTS0: INSIDE myModule.initContext() context=(47689) uri=http://.../
test_2.html persistedState = null
FTS0: INSIDE myModule.watchWindow() context=(47689)
FTS0: INSIDE myModule.loadedContext() context=(47689)
FTS0: INSIDE myModule.showContext() context=(47689)
Hope this clarifies rather than confuses!
Basically, the context creation is happening after the initial
request. However, since I cannot use the context.uid as a "key" it may
not be significant.
What else can I use to group up all the data I'm gathering and
associate it with a particular browsing tab (and therefore, by
extension, a FB panel)?
Thanks,
Manoj