File tree Expand file tree Collapse file tree 3 files changed +38
-0
lines changed
Userland/Libraries/LibWeb Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,7 @@ set(SOURCES
140
140
Fetch/Infrastructure/MimeTypeBlocking.cpp
141
141
Fetch/Infrastructure/NoSniffBlocking.cpp
142
142
Fetch/Infrastructure/PortBlocking.cpp
143
+ Fetch/Infrastructure/Task.cpp
143
144
Fetch/Infrastructure/URL.cpp
144
145
Fetch/Request.cpp
145
146
Fetch/Response.cpp
Original file line number Diff line number Diff line change
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
+
10
+ namespace Web ::Fetch::Infrastructure {
11
+
12
+ // https://fetch.spec.whatwg.org/#queue-a-fetch-task
13
+ void 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
+ }
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2022, Linus Groh <linusg@serenityos.org>
3
+ *
4
+ * SPDX-License-Identifier: BSD-2-Clause
5
+ */
6
+
7
+ #pragma once
8
+
9
+ #include < LibJS/Forward.h>
10
+ #include < LibJS/SafeFunction.h>
11
+
12
+ namespace Web ::Fetch::Infrastructure {
13
+
14
+ void queue_fetch_task (JS::Object&, JS::SafeFunction<void ()>);
15
+
16
+ }
You can’t perform that action at this time.
0 commit comments