LibWeb: Implement EventSource for server-sent events

EventSource allows opening a persistent HTTP connection to a server over
which events are continuously streamed.

Unfortunately, our test infrastructure does not allow for automating any
tests of this feature yet. It only works with HTTP connections.
This commit is contained in:
Timothy Flynn 2024-04-05 13:33:41 -04:00 committed by Andreas Kling
commit eb3b8f8ee4
Notes: sideshowbarker 2024-07-16 16:23:32 +09:00
12 changed files with 619 additions and 1 deletions

View file

@ -3118,7 +3118,8 @@ void Document::run_unloading_cleanup_steps()
// 4. If document's salvageable state is false, then:
if (!m_salvageable) {
// FIXME: 1. For each EventSource object eventSource whose relevant global object is equal to window, forcibly close eventSource.
// 1. For each EventSource object eventSource whose relevant global object is equal to window, forcibly close eventSource.
window->forcibly_close_all_event_sources();
// 2. Clear window's map of active timers.
window->clear_map_of_active_timers();