0

I would like to find an interaction in Javascript that only a human can do, but javascript can track it if the user has done it.

Something like an only readable event but not writable.

Adam Halasz
  • 57,421
  • 66
  • 149
  • 213

1 Answers1

1

You could use mouse-driven CSS pseudoclasses; I don't believe they can be triggered using Javascript: see Trigger css hover with JS for a little more information.

If you set some style aspect on the hover, for example, you might be able to detect that using javascript.

I don't know how well this approach would work cross-browser however, and you might need to use a visible element.

see also Activate an element's :active CSS pseudo-class using Javascript?

Community
  • 1
  • 1
penguat
  • 1,337
  • 1
  • 13
  • 25