Baseline Widely DOM API

api.Window.prompt

Granular MDN Browser Compat Data support history across 15 tracked browsers.

Specification Area
DOM API
Standard track
First Core Launch
Safari 1
2003-06-23
Core-3 Stability
1,998d (5.5y)
Last: Chrome (2008-12-11)
Baseline Feature
Widely
Alerts

Browser Support Timeline

Internet Explorer v4 (1997-09-30) Opera v3 (1997-12-01) Safari v1 (2003-06-23) Firefox v1 (2004-11-09) Safari on iOS v1 (2007-06-29) WebView on iOS v1 (2007-06-29) Chrome v1 (2008-12-11) Opera Android v10.1 (2010-11-09) Firefox for Android v4 (2011-03-29) Chrome Android v18 (2012-06-27) Samsung Browser v1.0 (2013-04-27) WebView Android v4.4 (2013-12-09) Edge v12 (2015-07-29) Quest Browser v5.0 (2018-07-01) Deno v1.5 (2020-10-27)
Green dot marks the first browser release (1997-09-30); blue dots show subsequent browser launches (+8428d total span).
Notes (9)Chrome: Starting with Chrome 46, this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.Firefox: Firefox strips newline characters from the prompt response; see bug 1716229.Chr And: Starting with Chrome Android 46, this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.FF And: Firefox for Android strips newline characters from the prompt response; see bug 1716229.WV And: Starting with WebView Android 46, this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.Samsung: Starting with Samsung Browser 5.0, this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.Opera, Op And: Starting with Opera 33, this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.Quest: Starting with Quest Browser 5.0, this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.IE: This function has no effect in the Modern UI/Metro version of Internet Explorer for Windows 8. It does not display a prompt to the user, and always returns undefined. It is not clear whether this is a bug or intended behavior. Desktop versions of IE do implement this function.

Full Browser Compatibility Table

BrowserTypeVersionRelease DateStatus / Caveats
Chrome desktop 1 2008-12-11 Supported
Firefox desktop 1 2004-11-09 Supported
Safari desktop 1 2003-06-23 Supported
Edge desktop 12 2015-07-29 Supported
Chrome Android mobile 18 2012-06-27 Supported
Firefox for Android mobile 4 2011-03-29 Supported
Safari on iOS mobile 1 2007-06-29 Supported
WebView Android mobile 4.4 2013-12-09 Supported
WebView on iOS mobile 1 2007-06-29 Supported
Samsung Browser mobile 1.0 2013-04-27 Supported
Opera desktop 3 1997-12-01 Supported
Opera Android mobile 10.1 2010-11-09 Supported
Deno server 1.5 2020-10-27 Supported
Node.js server — — —
Bun server — — —
Quest Browser xr 5.0 2018-07-01 Supported
Internet Explorer desktop 4 1997-09-30 Supported