Event when htmlviewer page opens a popup

Quick question of the standard htmlviewer: Is there a way to get out an event whenever the loaded page opens up a popup? It seems that DocumentComplete is not called before the popup is taken care of, e.g. when it asks for a permission to accept cookies or whatever.

You control what is put into the htmlviewer. What sort of popup are you talking about?

As an example, if htmlviewer loads www.google.com, it will open up a popup asking to accept cookies. My current project is a digital signage application so looking for a way to identify situations where pages are not displayed.

An htmlviewer is not a browser, and as far as I know doesn’t do cookies. Also I would have expected that whatever the htmlviewer displays is to be found somewhere as part of the document you are loading. So I don’t understand how that could be preventing the documentloaded event.

Yes, HTMLViewers retain cookies.

When JavaScript or a Link opens a new Window (target=_blank), there is an event for that. That is the common definition of Popup and what is leading to some confusion for me. Cookie consent overlays are generally not new windows, they are part of the webpage. There isn’t an event for those.

1 Like

Thanks, yes I guess overlays are getting more common with modern frontend frameworks anyway. An excess time between DocumentBegin and DocumentComplete might be a workaround as a client-side timeout.