Nacre/tests/smoke/pages/chatty.html

9 lines
446 B
HTML

<!doctype html><meta charset="utf-8"><title>Chatty</title>
<body style="font:16px sans-serif;padding:24px">
<p>Posts to Nacre's message handler every few milliseconds, also while it closes (S059).</p>
<script>
const post = () => { try { window.webkit.messageHandlers.nacre.postMessage('{"chatty":1}'); } catch (e) {} };
setInterval(post, 2);
window.addEventListener('pagehide', () => { for (let i = 0; i < 200; i++) post(); });
</script>
</body>