Skip to content

Comment on A replacement for JavaScript's “alert”

Comments

Does this guarantee that the alert will be on top of the html elements on the current page? Sometimes this is important if you are building a browser plugin and need to show dialog to the user. For example, I use alert instead of a modal html dialog because when you are injecting it on some pages it won't show up properly.

Chrome supports the <dialog> element which is guaranteed to appear on top of whatever page its injected on.

Javsacript's Alert, prompt, also guarantee it will appear on top.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.