summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/TimeRanges.h
blob: a124667d53a50686787fdd241e66c6dc397f0a26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 * 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);

public:
    size_t length() const;
    double start(u32 index) const;
    double end(u32 index) const;

private:
    explicit TimeRanges(JS::Realm&);

    virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
};

}