/src/serenity/Userland/Libraries/LibWeb/HTML/HTMLLabelElement.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Copyright (c) 2020, the SerenityOS developers. |
3 | | * |
4 | | * SPDX-License-Identifier: BSD-2-Clause |
5 | | */ |
6 | | |
7 | | #pragma once |
8 | | |
9 | | #include <LibWeb/HTML/HTMLElement.h> |
10 | | |
11 | | namespace Web::HTML { |
12 | | |
13 | | class HTMLLabelElement final : public HTMLElement { |
14 | | WEB_PLATFORM_OBJECT(HTMLLabelElement, HTMLElement); |
15 | | JS_DECLARE_ALLOCATOR(HTMLLabelElement); |
16 | | |
17 | | public: |
18 | | virtual ~HTMLLabelElement() override; |
19 | | |
20 | | virtual JS::GCPtr<Layout::Node> create_layout_node(NonnullRefPtr<CSS::StyleProperties>) override; |
21 | | |
22 | 0 | Optional<String> for_() const { return attribute(HTML::AttributeNames::for_); } |
23 | | |
24 | | JS::GCPtr<HTMLElement> control() const; |
25 | | JS::GCPtr<HTMLFormElement> form() const; |
26 | | |
27 | | private: |
28 | | HTMLLabelElement(DOM::Document&, DOM::QualifiedName); |
29 | | |
30 | | virtual void initialize(JS::Realm&) override; |
31 | | }; |
32 | | |
33 | | } |