Live data from Hacker News

Popover API

developer.mozilla.org

1–10 of 166 posts

Re: Popover API

#6
> The Popover API provides developers with a standard, consistent, flexible mechanism for displaying popover content on top of other page content.

Paywall 2.0?

Re: Popover API

#7

> The Popover API provides developers with a standard, consistent, flexible mechanism for displaying popover content on top of other page content. Paywall 2.0?

I've used it to implement windows for drilling deeper into rarely used settings in a web-based HMI.

It makes for very simple design compared to using JavaScript, and provides easy layering in DOM for it (including if you want to just delete the popover :D)

Re: Popover API

#8
Very cool. So if I understand correctly, this doesn’t really introduce any new capability, it just streamlines the need to have a modal div, mask div, container div, and some uncomfortable positioning CSS? It also adds some pseudo classes to simplify styling. I like it.

Re: Popover API

#9
I absolutely see the need for this if implemented in concert with the host OS windowing system, because current popovers must be emulated in a way that does not always work well.

For example, a browser-native today will be able to expand beyond the borders of the hosting browser window, so you can don't have to worry about it getting clipped to the window borders, but a fancy emulated select from toolkit like Quasar will not, ,which limits its placement options. So to do this right on win32 you would need each popover to have its own native HWND and on Cocoa/macOS you would need it in its own NSView.

Does anybody in here know if this is how it is actually implemented in the current browsers, or is it just a paint-over job inside the browser window?

Re: Popover API

#10
post #5
post #3

This sounds cool, but why does this page not have any images showing what a 'popover' is?

That would be useful. They do link to these interactive examples - looks like the default styles for popovers are not very exciting: https://mdn.github.io/dom-examples/popover-api/

How would you prefer it? I think the default styles (on chrome) are just enough, looks consistent with the rest of the default HTML styles.
Post reply on HN