/src/serenity/Userland/Libraries/LibWeb/HTML/NavigatorBeacon.h
Line | Count | Source |
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 | | |
7 | | #pragma once |
8 | | |
9 | | #include <LibWeb/Fetch/BodyInit.h> |
10 | | #include <LibWeb/WebIDL/ExceptionOr.h> |
11 | | |
12 | | namespace Web::HTML { |
13 | | |
14 | | class NavigatorBeaconMixin { |
15 | | public: |
16 | | WebIDL::ExceptionOr<bool> send_beacon(String const& url, Optional<Fetch::BodyInit> const& data = {}); |
17 | | |
18 | | private: |
19 | 0 | virtual ~NavigatorBeaconMixin() = default; |
20 | | |
21 | | friend class Navigator; |
22 | | }; |
23 | | |
24 | | } |