>> In NetExporter, you manually calculate the load times, rather than >> getting those from something provided.
>No, it gets all the timing info from the net panel and adapts to >HAR (the output format) needs. >From the code that I've seen, it does its own calculations. Then again, this is so abstracted that I generally loose my place when I go 3-4 levels up, or I hit a dead-end. If there's any code that references the net panel, it's not only difficult to find, but is far too difficult for a beginner, like me, to pick out of all the surrounding code and be able to understand. > See, net.js, updateSummaries() method. The results value is stored > in the UI and you could get it from there. That is what I've been looking for this entire time! But how do I access this from my code? Assume I know nothing, and please don't point me back to NetExporter, it's not helping me at all. > On Mar 11, 8:15 pm, Michele <[email protected]> wrote:> I'm trying to > setup listeners for two events: the page starts loading, > > and the page finishes loading. > > That's exactly what NetExport does. See for example how > page.startedDateTime field > is computed in harBuilder.js I've looked at this before. The examples you keep giving me lack context, so while I see the code and understand that you start timing at 0 and then populate it and use it later, I have no guidance on how to apply that in any other situation. From what I can tell you use buildPageTimings on every file because its called inside the buildEntry function, so I don't know how that helps me figure out when the page is loaded. The few things I've been able to find all point to adding an event listener for the content loaded event, and not doing any calculations myself. > > If the initialization method is not the > > place to do that, where is? > > The initialization is perfectly suitable for this. Just just need to > implement > the constructor function for NetListener. There is an exception on > line 67. > "NetListener is not defined" Thanks for pointing that out. I never look at the error console...Anyways, if I'm getting my information directly from the Net Panel (which was my original objective, but there is absolutely no documentation on how to get that information so I assumed it wasn't possible) then I shouldn't need a netlistener at all? It's strange that that throws an error though. I followed all the instructions to the letter... Thanks Michele -- 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.
