Can I record all events in a web browser?

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

Brief Summary

I am trying to intercept all submission forms, onclick and every keystroke. My pick library is either jquery or jquery + prototypejs. I believe that I can dispense events in the queue / stack and send them back to the server at intervals in order to maintain stability relatively stable.

Concern

The submission and change form will be relatively simple .. Something like

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

But how to ensure that I get priority over application handlers, since I have the habit of putting return false in many form handlers when there is a validation problem. As I understand it, this effectively stops the event on its roads.

My project

VPS . , /, -, , , , .

-, , DNS, , , URLS . html/text application/* sqlite, , . , keydown .

+3
1

return false;, .

// Bind custom event to all forms

    $('form').bind('custom_submit_event',function() {
        alert('custom submit event');
    });

// Bind submit event to all forms that triggers the custom event

    $('form').submit(function() {
        $(this).trigger('custom_submit_event');
    });

// Your regular submit event for a specific form

    $('#myform').submit(function() {
        // Run validation/submission code
        return false;
    });

, . , .

document. return false;, . ( ), .

    $(document).click(function() {
        alert('click')
    })
    .keydown(function() {
        alert('keydown')
    });
+2

Source: https://habr.com/ru/post/1743675/


All Articles