/* * Copyright (c) 2021, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include namespace Web::ResizeObserver { struct ResizeObserverOptions { String 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&, JS::Value callback); void observe(DOM::Element& target, ResizeObserverOptions); void unobserve(DOM::Element& target); void disconnect(); }; }