TimeRanges.h 589 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibJS/Forward.h>
  8. #include <LibWeb/Bindings/PlatformObject.h>
  9. namespace Web::HTML {
  10. class TimeRanges final : public Bindings::PlatformObject {
  11. WEB_PLATFORM_OBJECT(TimeRanges, Bindings::PlatformObject);
  12. JS_DECLARE_ALLOCATOR(TimeRanges);
  13. public:
  14. size_t length() const;
  15. double start(u32 index) const;
  16. double end(u32 index) const;
  17. private:
  18. explicit TimeRanges(JS::Realm&);
  19. virtual void initialize(JS::Realm&) override;
  20. };
  21. }