5

I am making a web app similar to instagram and i want to detect and call a function whenever a user takes the screenshot, is their any way to implement this with javascript?

Suraj Kumar
  • 281
  • 6
  • 13
  • 6
    There are many ways a user might collect a screenshot without the browser even knowing about it. – Pointy Jul 11 '18 at 13:58
  • 2
    Yes, due to security issues I don't think any browser want to implement such functionality. It's not in the w3 standard for sure. – Mark Baijens Jul 11 '18 at 14:01
  • Hulu does it see https://stackoverflow.com/questions/67916474/how-do-you-detect-a-screen-shot-with-js/67916575#67916575 – Brandon Stewart Jun 10 '21 at 07:35

1 Answers1

6

Currently, there is no way to handle a screenshot event through javascript. The screenshot functionality of phones simply has no connection to the browser.

Alen Genzić
  • 1,398
  • 10
  • 17