LibWeb: Resolve NavigatorBeacon FIXME regarding the partial interface

This commit is contained in:
Jelle Raaijmakers 2025-07-22 12:54:35 +02:00 committed by Sam Atkins
commit a6dfc6cdff
Notes: github-actions[bot] 2025-07-22 12:08:23 +00:00
5 changed files with 5 additions and 7 deletions

View file

@ -22,7 +22,7 @@
namespace Web::HTML { namespace Web::HTML {
class Navigator : public Bindings::PlatformObject class Navigator : public Bindings::PlatformObject
, public NavigatorBeaconMixin , public NavigatorBeaconPartial
, public NavigatorConcurrentHardwareMixin , public NavigatorConcurrentHardwareMixin
, public NavigatorDeviceMemoryMixin , public NavigatorDeviceMemoryMixin
, public NavigatorIDMixin , public NavigatorIDMixin

View file

@ -71,7 +71,6 @@ interface mixin NavigatorAutomationInformation {
readonly attribute boolean webdriver; readonly attribute boolean webdriver;
}; };
Navigator includes NavigatorBeacon;
Navigator includes NavigatorID; Navigator includes NavigatorID;
Navigator includes NavigatorLanguage; Navigator includes NavigatorLanguage;
Navigator includes NavigatorOnLine; Navigator includes NavigatorOnLine;

View file

@ -17,7 +17,7 @@
namespace Web::HTML { namespace Web::HTML {
// https://w3c.github.io/beacon/#sendbeacon-method // https://w3c.github.io/beacon/#sendbeacon-method
WebIDL::ExceptionOr<bool> NavigatorBeaconMixin::send_beacon(String const& url, Optional<Fetch::BodyInit> const& data) WebIDL::ExceptionOr<bool> NavigatorBeaconPartial::send_beacon(String const& url, Optional<Fetch::BodyInit> const& data)
{ {
auto& navigator = as<Navigator>(*this); auto& navigator = as<Navigator>(*this);
auto& realm = navigator.realm(); auto& realm = navigator.realm();

View file

@ -11,12 +11,12 @@
namespace Web::HTML { namespace Web::HTML {
class NavigatorBeaconMixin { class NavigatorBeaconPartial {
public: public:
WebIDL::ExceptionOr<bool> send_beacon(String const& url, Optional<Fetch::BodyInit> const& data = {}); WebIDL::ExceptionOr<bool> send_beacon(String const& url, Optional<Fetch::BodyInit> const& data = {});
private: private:
virtual ~NavigatorBeaconMixin() = default; virtual ~NavigatorBeaconPartial() = default;
friend class Navigator; friend class Navigator;
}; };

View file

@ -1,7 +1,6 @@
#import <Fetch/BodyInit.idl> #import <Fetch/BodyInit.idl>
// https://w3c.github.io/beacon/#sendbeacon-method // https://w3c.github.io/beacon/#sendbeacon-method
// FIXME: This is a partial interface not an interface mixin partial interface Navigator {
interface mixin NavigatorBeacon {
boolean sendBeacon(USVString url, optional BodyInit? data = null); boolean sendBeacon(USVString url, optional BodyInit? data = null);
}; };