mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
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:
parent
181f97879d
commit
dbb886fad2
22 changed files with 237 additions and 29 deletions
|
@ -503,7 +503,7 @@ DOMInterfaces = {
|
|||
|
||||
'Navigator': {
|
||||
'inRealms': ['GetVRDisplays'],
|
||||
'canGc': ['Languages'],
|
||||
'canGc': ['Languages', 'SendBeacon'],
|
||||
},
|
||||
|
||||
'Node': {
|
||||
|
|
|
@ -81,3 +81,9 @@ interface mixin NavigatorConcurrentHardware {
|
|||
partial interface Navigator {
|
||||
[SecureContext, SameObject, Pref="dom_async_clipboard_enabled"] readonly attribute Clipboard clipboard;
|
||||
};
|
||||
|
||||
// https://w3c.github.io/beacon/#sendbeacon-method
|
||||
partial interface Navigator {
|
||||
[Throws, Pref="dom_navigator_sendbeacon_enabled"]
|
||||
boolean sendBeacon(USVString url, optional BodyInit? data = null);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue