Cloudflare Workers Popup Box

Hi, i’m trying to create a popup box (just the normal browser one) in my worker to ask the user if they would like to accept a file. Unfortunately im finding this is very difficult to achieve. Does anyone have any recommendations for this?

You could append HTML for a modal but it’s much more recommended to do this through client-side JS.

If you did want to do this through a Worker, you’d need to use HTMLRewriter to append the HTML code and also probably append some JS for the handling of the modal (again, just doing this all client-side rather than having to inject would be much better)