Comment

Comment by thomasfoster96

This will happen in most browsers (I’m on Safari 14, macOS 11.2). The popup-blockers in most browsers will allow a popup if it is opened directly because of user input, such as a button click — a fairly simple measure which can be implemented by only allowing certain APIs to work within an event handler, for example.

There are a few Web APIs which work this way — for example, you can’t make a page fullscreen unless you do so in response to user input/interaction [0].

[0]: https://developer.mozilla.org/en-US/docs/Web/API/Element/req...

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton