Possible to capture all events in a web browser?

Posted by David on Stack Overflow See other posts from Stack Overflow or by David
Published on 2010-05-02T03:52:41Z Indexed on 2010/05/02 3:57 UTC
Read the original article Hit count: 266

Filed under:
|
|
|

I am working on a pet project and am at the research stage.

Quick summary

I am trying to intercept all form submits, onclick, and every single keydown. My library of choice is either jquery, or jquery + prototypejs. I figure I can batch up the events into a queue/stack and send it back to the server in time interval batches to keep performance relatively stable.

Concerns

Form submits and change's would be relatively simple.. Something like

$("form :inputs").bind("change", function() { ... record event... }); 

But how to ensure I get precedence over the applications handlers as I have a habit of putting return false on a lot of my form handlers when there is a validation issue. As I understand it, that effectively stops the event in its tracks.

My project

For my smaller remote clients I will put their products onto a VPS or run it in my home data center. Currently I use a basic authentication system, given a username/password they see the website and then hopefully send me somewhat sane notes on what is broken or should be tweaked.

As a better solution, I've written a simple proxy web server that does the above but allows me to have one DNS entry and then depending on credentials it makes an internal request relaying headers and re-writing URLS as needed. Every single html/text or application/* request is compressed and shoved into a sqlite table so I can partially replay what they've done. Now I am shifting to the frontend and would like to capture clicks, keydown's, and submits on everything on the page.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about events