Hacker News new | ask | show | jobs
by gwd 771 days ago
I'm seeing a lot of this kind of comment, but it's a bit non-sensical. You can implement pop-overs currently using existing <div>'s and such; e.g.:

https://getbootstrap.com/docs/5.3/components/popovers/

All this means is that you can implement popovers without having to include a magic extra library. All blocking an explicit "popover" element would do is cause people to stick with custom libraries.

1 comments

I generally agree with you, but one factor is the ability to filter out scripts using browser plugins. For example, if a page has 3rd-party scripts that trigger obnoxious modals, I can use NoScript to prevent those scripts from executing. If it doesn't require scripts to open the modals, would it shift the burden to adblockers, and start another competition in which the site and the adblocker are trying to get around the other?

I'm strongly in favor of the popover API existing, but it'll be interesting to see how it shifts handling page behaviors.

Obnoxious modals with ads would still download the content dynamically with JS so the NoScript would still do the job.
I still don't think there's any significant difference. You can create popover elements without JavaScript, but you can also create divs with a high z-index without JavaScript. You can toggle popover visibility via CSS or click without JavaScript, but you can also do that with divs and a checkbox.