/src/serenity/Userland/Libraries/LibWeb/HTML/HTMLLIElement.h
Line | Count | Source |
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/ARIA/Roles.h> |
10 | | #include <LibWeb/HTML/HTMLElement.h> |
11 | | #include <LibWeb/WebIDL/Types.h> |
12 | | |
13 | | namespace Web::HTML { |
14 | | |
15 | | class HTMLLIElement final : public HTMLElement { |
16 | | WEB_PLATFORM_OBJECT(HTMLLIElement, HTMLElement); |
17 | | JS_DECLARE_ALLOCATOR(HTMLLIElement); |
18 | | |
19 | | public: |
20 | | virtual ~HTMLLIElement() override; |
21 | | |
22 | | // https://www.w3.org/TR/html-aria/#el-li |
23 | 0 | virtual Optional<ARIA::Role> default_role() const override { return ARIA::Role::listitem; } |
24 | | |
25 | | WebIDL::Long value(); |
26 | | void set_value(WebIDL::Long value) |
27 | 0 | { |
28 | 0 | set_attribute(AttributeNames::value, String::number(value)).release_value_but_fixme_should_propagate_errors(); |
29 | 0 | } |
30 | | |
31 | | private: |
32 | | HTMLLIElement(DOM::Document&, DOM::QualifiedName); |
33 | | |
34 | | virtual void initialize(JS::Realm&) override; |
35 | | }; |
36 | | |
37 | | } |