2023-04-18 16:19:37 -04:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibJS/Forward.h>
|
|
|
|
#include <LibWeb/Bindings/PlatformObject.h>
|
|
|
|
|
|
|
|
namespace Web::HTML {
|
|
|
|
|
|
|
|
class TimeRanges final : public Bindings::PlatformObject {
|
|
|
|
WEB_PLATFORM_OBJECT(TimeRanges, Bindings::PlatformObject);
|
2024-11-15 04:01:23 +13:00
|
|
|
GC_DECLARE_ALLOCATOR(TimeRanges);
|
2023-04-18 16:19:37 -04:00
|
|
|
|
|
|
|
public:
|
|
|
|
size_t length() const;
|
|
|
|
double start(u32 index) const;
|
|
|
|
double end(u32 index) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
explicit TimeRanges(JS::Realm&);
|
|
|
|
|
2023-08-07 08:41:28 +02:00
|
|
|
virtual void initialize(JS::Realm&) override;
|
2023-04-18 16:19:37 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|