/* * Copyright (c) 2021, Sam Atkins * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include namespace Web::CSS { // https://www.w3.org/TR/cssom-1/#the-medialist-interface class MediaList final : public RefCounted { public: static NonnullRefPtr create(NonnullRefPtrVector&& media) { return adopt_ref(*new MediaList(move(media))); } ~MediaList(); String media_text() const; void set_media_text(String const&); size_t length() const { return m_media.size(); } Optional item(size_t index) const; void append_medium(String); void delete_medium(String); private: explicit MediaList(NonnullRefPtrVector&&); NonnullRefPtrVector m_media; }; }