quoad
Version:
Serenity/JS: Next generation acceptance testing library for modern web applications.
20 lines (19 loc) • 530 B
HTML
<html lang="en">
<body>
<button id="trigger" onclick="trigger()">Trigger Alert</button>
<p id="result"></p>
<script>
function trigger() {
document.getElementById("result").innerHTML = (
function() {
setTimeout(function() {
alert('Almost there!');
document.getElementById("result").innerHTML = 'And the wait is over :-)';
}, 250);
return 'The wait has began';
}
)();
}
</script>
</body>
</html>