How to determine the position of the popup requesting permission from the user?

  • 0
    You need to make an arrow that will point to a popup that asks the user for permission to track geolocation or show notifications. How can I determine the current location of this native popup relative to the browser window? I haven’t come up with anything better except enumerating all major browsers manually. Maybe there is some normal way?
    JavaScript Anonymous, May 4, 2020

  • 2 Answers
  • 0
    This same native browser window should not be accessible from the sandbox. And in general, as far as I remember, from next year there will be no pop-ups in the browser, the user himself must go and turn on the notification, because 99% of them are never included (well, according to Mozila).
    Anonymous

  • 0
    No way. Only by the user-agent can determine the browser and adjust its arrow to the screen resolution and the location of the window on it. You will have to do the tests yourself. And in Firefox, in general, this ad hangs from the beginning of the address bar, and it can be carried anywhere from the edge of the window
    Anonymous

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!