LibWeb: Add WebSocket task source

The WebSocket spec tells us to queue tasks instead of firing events
synchronously at WebSockets, so this commit does exactly that.

The way we've implemented web sockets means that the work is spread
across multiple libraries and even processes, which is why it doesn't
look like the spec verbatim.
This commit is contained in:
Andreas Kling 2024-11-15 18:56:16 +01:00 committed by Andreas Kling
commit 87fc7028d7
Notes: github-actions[bot] 2024-11-15 22:19:08 +00:00
2 changed files with 53 additions and 37 deletions

View file

@ -68,6 +68,9 @@ public:
// https://w3c.github.io/IndexedDB/#database-access-task-source
DatabaseAccess,
// https://websockets.spec.whatwg.org/#websocket-task-source
WebSocket,
// !!! IMPORTANT: Keep this field last!
// This serves as the base value of all unique task sources.
// Some elements, such as the HTMLMediaElement, must have a unique task source per instance.