serenity/Base/res/html/misc/prompt.html
Timothy Flynn 894bddf62c Base: Add a simple test page for window.prompt
The window prototypes alert, confirm, and prompt must "pause" execution
until a response is received from the user. This test page is meant to
ensure that a timeout queued before a prompt is not executed until after
that prompt is closed.
2022-11-16 17:23:56 +00:00

18 lines
451 B
HTML

<!DOCTYPE html>
<html>
<head>
</head>
<body>
<pre id=message></pre>
<script>
const closed = (message) => {
console.log(message);
document.getElementById('message').innerHTML = `Message: "${message}"\n`;
};
setTimeout(() => { console.log('This must not appear until after the prompt is closed.'); }, 1000);
closed(prompt("Hello friends!"));
</script>
</body>
</html>