2020-08-01 03:04:26 +01:00
|
|
|
/*
|
2021-04-28 22:46:44 +02:00
|
|
|
* Copyright (c) 2020, the SerenityOS developers.
|
2020-08-01 03:04:26 +01:00
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-08-01 03:04:26 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2023-01-28 22:23:16 +00:00
|
|
|
#include <LibWeb/ARIA/Roles.h>
|
2020-08-01 03:04:26 +01:00
|
|
|
#include <LibWeb/HTML/HTMLElement.h>
|
|
|
|
|
|
|
|
namespace Web::HTML {
|
|
|
|
|
|
|
|
class HTMLDetailsElement final : public HTMLElement {
|
2022-08-28 13:42:07 +02:00
|
|
|
WEB_PLATFORM_OBJECT(HTMLDetailsElement, HTMLElement);
|
|
|
|
|
2020-08-01 03:04:26 +01:00
|
|
|
public:
|
2022-08-28 13:42:07 +02:00
|
|
|
virtual ~HTMLDetailsElement() override;
|
2020-08-01 03:04:26 +01:00
|
|
|
|
2022-11-28 17:58:13 -06:00
|
|
|
// https://www.w3.org/TR/html-aria/#el-details
|
2023-01-28 22:23:16 +00:00
|
|
|
virtual Optional<ARIA::Role> default_role() const override { return ARIA::Role::group; };
|
2022-11-28 17:58:13 -06:00
|
|
|
|
2023-06-02 21:44:03 +02:00
|
|
|
// ^Element
|
|
|
|
WebIDL::ExceptionOr<void> set_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override;
|
|
|
|
void remove_attribute(DeprecatedFlyString const& name) override;
|
|
|
|
|
|
|
|
void run_details_notification_task_steps();
|
|
|
|
|
2022-08-28 13:42:07 +02:00
|
|
|
private:
|
2022-02-18 21:00:52 +01:00
|
|
|
HTMLDetailsElement(DOM::Document&, DOM::QualifiedName);
|
2023-01-10 06:28:20 -05:00
|
|
|
|
2023-01-28 12:33:35 -05:00
|
|
|
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
|
2020-08-01 03:04:26 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|