mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +00:00
LibWeb: Implement basic support for MessageChannel and MessagePort
This patch adds a basic initial implementation of these API's. Since LibWeb currently doesn't support workers, this implementation of messaging doesn't bother with serializing and deserializing messages.
This commit is contained in:
parent
c7aa32b90f
commit
95559c4277
12 changed files with 322 additions and 0 deletions
7
Base/res/html/misc/message-channel.html
Normal file
7
Base/res/html/misc/message-channel.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<script>
|
||||
var channel = new MessageChannel();
|
||||
channel.port2.onmessage = function(event) {
|
||||
console.log("Port2 received '" + event.data + "'");
|
||||
}
|
||||
channel.port1.postMessage("HELLO FRIEND");
|
||||
</script>
|
|
@ -127,6 +127,7 @@
|
|||
|
||||
<h2>JavaScript/Wasm</h2>
|
||||
<ul>
|
||||
<li><a href="message-channel.html">MessageChannel</a></li>
|
||||
<li><a href="websocket.html">WebSocket API Test</a></li>
|
||||
<li><a href="cookie.html">document.cookie</a></li>
|
||||
<li><a href="event-bubbling-and-multiple-listeners.html">event bubbling and multiple listeners</a></li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue