mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibDevTools: Pass request initiator type to network panel
Propagate the request initiator type (e.g., "xmlhttprequest", "fetch", "script", "stylesheet") from LibWeb through the IPC layer to DevTools. This enables Firefox DevTools to correctly identify XHR/fetch requests and display appropriate cause types in the Network panel's "Initiator" column.
This commit is contained in:
committed by
Andreas Kling
parent
31ffd2e8e5
commit
681d00c218
Notes:
github-actions[bot]
2026-01-15 19:11:36 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/681d00c2187 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7472 Reviewed-by: https://github.com/trflynn89
@@ -436,11 +436,11 @@ void WebContentClient::did_output_js_console_message(u64 page_id, ConsoleOutput
|
||||
}
|
||||
}
|
||||
|
||||
void WebContentClient::did_start_network_request(u64 page_id, u64 request_id, URL::URL url, ByteString method, Vector<HTTP::Header> request_headers, ByteBuffer request_body)
|
||||
void WebContentClient::did_start_network_request(u64 page_id, u64 request_id, URL::URL url, ByteString method, Vector<HTTP::Header> request_headers, ByteBuffer request_body, Optional<String> initiator_type)
|
||||
{
|
||||
if (auto view = view_for_page_id(page_id); view.has_value()) {
|
||||
if (view->on_network_request_started)
|
||||
view->on_network_request_started(request_id, url, method, request_headers, move(request_body));
|
||||
view->on_network_request_started(request_id, url, method, request_headers, move(request_body), move(initiator_type));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user