mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-19 16:59:47 +00:00
LibWeb/Fetch: Support setting request priority from JS
This commit is contained in:
parent
4387d12159
commit
74d90338b1
Notes:
sideshowbarker
2024-07-17 06:24:08 +09:00
Author: https://github.com/jamierocks
Commit: 74d90338b1
Pull-request: https://github.com/SerenityOS/serenity/pull/24193
6 changed files with 23 additions and 1 deletions
|
@ -113,6 +113,20 @@ Infrastructure::Request::RedirectMode from_bindings_enum(Bindings::RequestRedire
|
|||
}
|
||||
}
|
||||
|
||||
Infrastructure::Request::Priority from_bindings_enum(Bindings::RequestPriority request_priority)
|
||||
{
|
||||
switch (request_priority) {
|
||||
case Bindings::RequestPriority::High:
|
||||
return Infrastructure::Request::Priority::High;
|
||||
case Bindings::RequestPriority::Low:
|
||||
return Infrastructure::Request::Priority::Low;
|
||||
case Bindings::RequestPriority::Auto:
|
||||
return Infrastructure::Request::Priority::Auto;
|
||||
default:
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
}
|
||||
|
||||
Bindings::ReferrerPolicy to_bindings_enum(ReferrerPolicy::ReferrerPolicy referrer_policy)
|
||||
{
|
||||
switch (referrer_policy) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue