On Jul 28, 5:25 pm, Prasanna Bale <[email protected]> wrote: > Hello Honza, > > Thank you for the code snippet. It did worked for me. > > I am learning javascript n new to firebug. > Can you please tell me what is a difference between panel and a context? A panel in Firebug is what you see in the UI, e.g. Console, Script, Net etc. A panel can be selected by the user, by clicking on it's tab (all panel tabs are displayed above Firebug toolbar in an area called tab-bar). Every panel has direct access to a context object.
The context is an object that is associated with a web page. Every web page has its own context object. The context object contains all meta-data (collected by Firebug and Firebug extensions) about the associated page. > Does the panel has a context? Yes. A panel is usually displaying data from the context. For example, the Net panel, reads all the timing information about HTTP requests executed by the associated page. Note that meta-data are usually collected by an object called Module, which is also responsible for storing the data into the context object. > In firebug I have come accross firebug context, currentcontext and lot of > assignments made to and fro. In general what are these objects refer to? I explained the context object above. The current context (Firebug.currentContext) points to the context object associated with the current web page (currently selected tab in Firefox). Honza > > Thanks, > Prasanna > > On Wed, Jul 27, 2011 at 2:05 AM, Jan Honza Odvarko <[email protected]>wrote: > > > > > > > > > > > > > On Jul 26, 5:15 pm, Prasanna Bale <[email protected]> wrote: > > > Thank you for the reply. > > > > Yea, I did looked into this API. but as per my understanding, this API is > > > used to capture the behaviour of inspectNode and as well HTML view. I > > might > > > be wrong. > > > Here I want to redirect from my panel to HTML view. I thought its just a > > > simple call by passing in the right context. > > > > I could able to redirect from my panel to HTML view by calling > > > Firebug.inspector.startInspecting(). but, HTML view shows up the window > > > object instead of the HTML text. > > Try following: > > > var panel = Firebug.chrome.selectPanel("html"); > > panel.select(node); // where node is the link element you want to > > select in the HTML panel. > > > I didn't test the code so, please let me know if it works for you. > > > > One more thing is > > > Can you please tell what is the purpose of insertRows() and renderHtml() > > in > > > domplate.js ? > > renderHTML: is processing a given template with passed arguments and > > generates HTML source. In most cases you don't need this method. > > insertRows: insert new TRs into an existing table. Should be applied > > on a template that represents a table row: TR() parent should be an > > existing row (the last one in case you want to append rows at the > > end). > > > insertRows is used e.g. by the Net panel to create new entries for > > HTTP requests, see: > > >http://code.google.com/p/fbug/source/browse/branches/firebug1.8/conte... > > >http://code.google.com/p/fbug/source/browse/branches/firebug1.8/conte... > > > Honza > > > -- > > You received this message because you are subscribed to the Google Groups > > "Firebug" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group at > >http://groups.google.com/group/firebug?hl=en. > > -- > Prasanna Bale > Visiting Software Developer - UIUC (DRES) > Tel: (217) 244-1669 -- You received this message because you are subscribed to the Google Groups "Firebug" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/firebug?hl=en.
