Serenity Operating System
at master 21 lines 694 B view raw
1/* 2 * Copyright (c) 2022, Linus Groh <linusg@serenityos.org> 3 * 4 * SPDX-License-Identifier: BSD-2-Clause 5 */ 6 7#include <LibWeb/Fetch/Infrastructure/Task.h> 8#include <LibWeb/HTML/EventLoop/EventLoop.h> 9 10namespace Web::Fetch::Infrastructure { 11 12// https://fetch.spec.whatwg.org/#queue-a-fetch-task 13void queue_fetch_task(JS::Object& task_destination, JS::SafeFunction<void()> algorithm) 14{ 15 // FIXME: 1. If taskDestination is a parallel queue, then enqueue algorithm to taskDestination. 16 17 // 2. Otherwise, queue a global task on the networking task source with taskDestination and algorithm. 18 HTML::queue_global_task(HTML::Task::Source::Networking, task_destination, move(algorithm)); 19} 20 21}