2

Do we receive any callback event/function when user clicks allow in popups block button in google chrome?

enter image description here

Always_a_learner
  • 4,585
  • 13
  • 63
  • 112
  • Check this thread, could solve your problem https://stackoverflow.com/questions/4602964/how-do-i-prevent-google-chrome-from-blocking-my-popup – Ranga Sep 26 '22 at 15:03

1 Answers1

1

To detect if a browser is blocking a popup with JavaScript, we can check the closed property of the window.

You can call window.open to open the url. Then we check if the window object closed property is true or undefined or if the window object is false.

If any of these are true, then the window is blocked from opening.

Pablo M.
  • 494
  • 7
  • 14
  • I was asking how I can get some event when user clicks on "always allow popups" and done. – Always_a_learner Sep 15 '22 at 12:14
  • Sorry @Always_a_learner , I did not understand your question correctly. The only thing I can think of is to try it with [monitorEvents](https://stackoverflow.com/a/15923770/7306365) – Pablo M. Sep 15 '22 at 13:31