2020-08-01 03:07:00 +01:00
|
|
|
/*
|
2021-04-28 22:46:44 +02:00
|
|
|
* Copyright (c) 2020, the SerenityOS developers.
|
2024-06-09 10:32:20 +01:00
|
|
|
* Copyright (c) 2024, Jamie Mansfield <jmansfield@cadixdev.org>
|
2020-08-01 03:07:00 +01:00
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-08-01 03:07:00 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibWeb/HTML/HTMLElement.h>
|
2024-06-09 10:32:20 +01:00
|
|
|
#include <LibWeb/HTML/TextTrack.h>
|
2020-08-01 03:07:00 +01:00
|
|
|
|
|
|
|
namespace Web::HTML {
|
|
|
|
|
|
|
|
class HTMLTrackElement final : public HTMLElement {
|
2022-08-28 13:42:07 +02:00
|
|
|
WEB_PLATFORM_OBJECT(HTMLTrackElement, HTMLElement);
|
2023-11-19 19:47:52 +01:00
|
|
|
JS_DECLARE_ALLOCATOR(HTMLTrackElement);
|
2022-08-28 13:42:07 +02:00
|
|
|
|
2020-08-01 03:07:00 +01:00
|
|
|
public:
|
2022-08-28 13:42:07 +02:00
|
|
|
virtual ~HTMLTrackElement() override;
|
2020-08-01 03:07:00 +01:00
|
|
|
|
2024-08-05 22:28:19 +01:00
|
|
|
WebIDL::UnsignedShort ready_state();
|
|
|
|
|
2024-06-09 10:32:20 +01:00
|
|
|
JS::Handle<TextTrack> track() { return m_track; }
|
|
|
|
|
2022-08-28 13:42:07 +02:00
|
|
|
private:
|
2022-02-18 21:00:52 +01:00
|
|
|
HTMLTrackElement(DOM::Document&, DOM::QualifiedName);
|
2023-01-10 06:28:20 -05:00
|
|
|
|
2023-08-07 08:41:28 +02:00
|
|
|
virtual void initialize(JS::Realm&) override;
|
2024-07-05 07:57:08 +01:00
|
|
|
virtual void visit_edges(Cell::Visitor&) override;
|
2024-06-09 10:32:20 +01:00
|
|
|
|
|
|
|
// ^DOM::Element
|
2024-11-14 08:14:16 -05:00
|
|
|
virtual void attribute_changed(FlyString const& name, Optional<String> const& old_value, Optional<String> const& value, Optional<FlyString> const& namespace_) override;
|
2024-06-09 10:32:20 +01:00
|
|
|
|
|
|
|
JS::GCPtr<TextTrack> m_track;
|
2020-08-01 03:07:00 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|