'How to differentiate between JavaScript submit and manual submit (for forms I don't own)

My question is almost the same as this one. But I have to ask the question again because I can not accept the answer that the OP there has seem to accept. I like a solution to work on any form on any page, so adding a hidden field won't work.

I have examined the submit events from one that's programmatically created and one that's created manually (actual click, return, etc). And as far as I can tell, the submit events are the same. Is there some ways to tell the difference?

Say on http://www.bing.com, using Chrome console:

var loginForm = document.forms[0];
var submitEvent = new Event('submit');
loginForm.dispatchEvent(submitEvent);

Note: I only need this to work on Chrome and JavaScript only.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source