cdp: add missing fields to Network.requestWillBeSent

This commit is contained in:
Pierre Tachoire
2025-12-10 18:22:44 +01:00
parent 9579f727b3
commit 34518dfa98
2 changed files with 18 additions and 1 deletions

View File

@@ -679,6 +679,19 @@ pub const Request = struct {
xhr,
script,
fetch,
// Allowed Values: Document, Stylesheet, Image, Media, Font, Script,
// TextTrack, XHR, Fetch, Prefetch, EventSource, WebSocket, Manifest,
// SignedExchange, Ping, CSPViolationReport, Preflight, FedCM, Other
// https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-ResourceType
pub fn string(self: ResourceType) []const u8 {
return switch (self) {
.document => "Document",
.xhr => "XHR",
.script => "Script",
.fetch => "Fetch",
};
}
};
};