Added listeners to the constructing kw options (#2044)

This commit is contained in:
Andrea Giammarchi
2024-05-03 16:34:21 +02:00
committed by GitHub
parent d1d1c5740f
commit c49cb9231b
4 changed files with 15 additions and 10 deletions

View File

@@ -22,10 +22,12 @@
print(event.type)
document.documentElement.classList.add("ok")
ws = WebSocket(url="ws://localhost:5037/")
ws.onopen = onopen
ws.onmessage = onmessage
ws.onclose = onclose
ws = WebSocket(
url="ws://localhost:5037/",
onopen=onopen,
onmessage=onmessage,
onclose=onclose
)
</script>
</body>
</html>