implement basic automated dom event tracking
flush event queue and wait for request before unloading page