Determine if this JavaScript action has been triggered by the user.

Is it possible to determine whether a given JavaScript action is triggered by a user? For example, I want to know if a link was clicked by a user or the jQuery fire event method?

+6
source share
1 answer

event.which will be undefined if the event is fired with code.

jsFiddle .

+12
source

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


All Articles