NavigatorBeacon.h 476 B

123456789101112131415161718192021222324
  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/WebIDL/ExceptionOr.h>
  9. namespace Web::HTML {
  10. class NavigatorBeaconMixin {
  11. public:
  12. WebIDL::ExceptionOr<bool> send_beacon(String const& url, Optional<Fetch::BodyInit> const& data = {});
  13. private:
  14. virtual ~NavigatorBeaconMixin() = default;
  15. friend class Navigator;
  16. };
  17. }