NavigatorBeacon.h 511 B

12345678910111213141516171819202122232425
  1. /*
  2. * Copyright (c) 2023, Bastiaan van der Plaat <bastiaan.v.d.plaat@gmail.com>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/Fetch/BodyInit.h>
  8. #include <LibWeb/HTML/Navigator.h>
  9. #include <LibWeb/WebIDL/ExceptionOr.h>
  10. namespace Web::HTML {
  11. class NavigatorBeaconMixin {
  12. public:
  13. WebIDL::ExceptionOr<bool> send_beacon(String const& url, Optional<Fetch::BodyInit> const& data = {});
  14. private:
  15. virtual ~NavigatorBeaconMixin() = default;
  16. friend class Navigator;
  17. };
  18. }