Browser Metrics:Data Collectors: Difference between revisions

(trying to make window events be more visibly grouped)
Line 23: Line 23:
*  non-default values for built-in prefs
*  non-default values for built-in prefs


===Window Events===
===Window Event===


Window events log various actions pertaining to DOM Windows, which provide a context for load events.
Window events log various actions pertaining to DOM Windows, which provide a context for load events.


Common Window Event attributes:
Window Event Attributes:
<tt>action = [string]</tt>


<tt>window = [integer window id]</tt>
Indicates the action that happened for this window.  Possible values are:


The id of the affected window.  Ids are assigned starting from 0 and are never reused during that session.  The window id is not unique across sessions.
<li><tt>create</tt>: a new toplevel or child DOM Window was created</li>
<li><tt>open</tt>: a toplevel DOM Window was opened</li>
<li><tt>close</tt>: a toplevel DOM Window was closed</li>
<li><tt>destroy</tt>: a toplevel or child DOM Window was destroyed</li>


=====Window Create Event=====


Records the creation of a new toplevel or child DOM Window.
<tt>window = [integer window id]</tt>


Element name: <tt>windowcreate</tt>
The id of the affected window.  Ids are assigned starting from 0 and are never reused during that session.  The window id is not unique across sessions.
 
Event-specific attributes:


<tt>parent = [integer window id]</tt> (optional)
<tt>parent = [integer window id]</tt> (optional)


The id of the parent of the newly created window, if present.
For create events, the id of the parent of the newly created window.  Toplevel windows do not have a parent, so this attribute will not be set.


<tt>chrome = [boolean]</tt> (optional)
<tt>chrome = [boolean]</tt> (optional)


Whether the new window has chrome privileges.  Defaults to false.
For create events, whether the new window has chrome privileges.  Defaults to false.
 
=====Window Open Event=====
 
Records the opening of a toplevel DOM Window.
 
Element name: <tt>windowopen</tt>
 
Event-specific attributes:


<tt>opener = [integer window id]</tt> (optional)
<tt>opener = [integer window id]</tt> (optional)


The id of the opener DOM window, if present.
For open events, the id of the opener DOM window.  Windows opened from native code may not have an opener, and this attribute will not be set.
 
=====Window Close Event=====
 
Records the closing of a toplevel DOM Window.
 
Element name: <tt>windowclose</tt>
 
Event-specific attributes: none
 
=====Window Destroy Event=====
 
Records the destruction of a toplevel or child DOM Window.
 
Element name: <tt>windowdestroy</tt>
 
Event-specific attributes: none
 


===Load Event===
===Load Event===
53

edits