0

If the user switches tab or open other applications, I want to throw an error message

How to do this in JavaScript? (I'm using Angular) Thanks in advance

Mike S.
  • 4,248
  • 3
  • 12
  • 25
Anjana
  • 388
  • 4
  • 14
  • 2
    Does this answer your question? [Detect If Browser Tab Has Focus](https://stackoverflow.com/questions/7389328/detect-if-browser-tab-has-focus) – Maxim Mazurok Apr 24 '20 at 07:05

1 Answers1

1

Question already answered here: Is there a way to detect if a browser window is not currently active?

Not specific to Angular but JS.

Terry
  • 577
  • 2
  • 5