mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-18 15:32:22 +00:00
LibWeb: Resolve NavigatorBeacon FIXME regarding the partial interface
This commit is contained in:
parent
529ab9d88a
commit
a6dfc6cdff
Notes:
github-actions[bot]
2025-07-22 12:08:23 +00:00
Author: https://github.com/gmta
Commit: a6dfc6cdff
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5559
Reviewed-by: https://github.com/AtkinsSJ ✅
5 changed files with 5 additions and 7 deletions
|
@ -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
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
|
@ -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);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue