Implement initial version of navigator.sendBeacon (#38301)

Gated behind the feature flag `dom_navigator_sendbeacon_enabled` as the
`keep-alive` fetch parameter is crucial for real-life use cases such as
analytics requests.

Part of #4577
Part of #38302

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This commit is contained in:
Tim van der Lippe 2025-08-02 17:14:07 +02:00 committed by GitHub
parent 181f97879d
commit dbb886fad2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 237 additions and 29 deletions

View file

@ -801,7 +801,7 @@ fn is_cors_safelisted_language(value: &[u8]) -> bool {
// https://fetch.spec.whatwg.org/#cors-safelisted-request-header
// subclause `content-type`
fn is_cors_safelisted_request_content_type(value: &[u8]) -> bool {
pub fn is_cors_safelisted_request_content_type(value: &[u8]) -> bool {
// step 1
if value.iter().any(is_cors_unsafe_request_header_byte) {
return false;