> 2) Expose helper event:
>
> "HARPageLoaded": sent when the page finishes loading. This is different 
> from the existing 'DOMContentLoaded' and 'load' events. This new event is 
> sent when there are no pending HTTP requests and no new HTTP requests has 
> started for given period of time (e.g. 1000 ms).
>
> I believe that the trigger method and the event should be enough for 
> integration with any automated system (e.g. based on Selenium). The rest is 
> upto the automated system - the driver.
>
> What do you think?
>
> Can we simplify the feature yet?
> Do you need more to implement automated HAR export from the browser?
>

I don't see the value gained here by adding another DOM level event? 
"DOMContentLoaded" is the correct event to listen to, then ask for the HAR 
export.

in other words: I'm listening on events related to the DOM, and any changes 
related to it "HARPageLoaded" does not translate to a "DOM" event as far as 
I can tell, it's a background process that's creating the HAR object, not 
affecting the DOM object itself.

another example is adding an image element and listening to "load" event 
then triggering HAR export.
similarly, any DOM-level event can be used to trigger export, current or 
future ones ("load", "domready", etc ... depending on implementation / 
browser)

if creating the HAR object does in deed require an event-like behaviour 
(its happening in a different thread / background process / etc ...) then 
there can still be an event such as "HARReady", but on the HAR object, not 
the DOM. example:

document.addEventListener("DOMContentLoaded", function gimmeHAR (e) {
  // initiate somehow
  var har = window.HAR.export()
  // or
  var har = new HAR.triggerExport()
  // etc ...

  har.addEventListener("ready", function nomnom (Obj) {
    // Obj = HAR goodness
  })
})


-- 
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/firebug.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/firebug/4e65770a-44b1-4551-a22f-f4e27e2062c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to