mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
894bddf62c
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.
17 lines
451 B
HTML
17 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>
|