/* * Copyright (c) 2021, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include namespace Web::ResizeObserver { struct ResizeObserverOptions { Bindings::ResizeObserverBoxOptions box; }; // https://drafts.csswg.org/resize-observer/#resize-observer-interface class ResizeObserver : public RefCounted , public Bindings::Wrappable { public: using WrapperType = Bindings::ResizeObserverWrapper; static NonnullRefPtr create_with_global_object(JS::GlobalObject&, Bindings::CallbackType const& callback); void observe(DOM::Element& target, ResizeObserverOptions); void unobserve(DOM::Element& target); void disconnect(); }; }