1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:38:12 +00:00

LibWeb: Implement ResizeObserver::disconnect()

This commit is contained in:
Aliaksandr Kalenik 2024-02-19 00:07:42 +01:00 committed by Andreas Kling
parent 70a0f07732
commit 2b7e7cc1ad
3 changed files with 80 additions and 2 deletions

View file

@ -89,10 +89,14 @@ void ResizeObserver::unobserve(DOM::Element& target)
m_observation_targets.remove(observation.index());
}
// https://drafts.csswg.org/resize-observer/#dom-resizeobserver-disconnect
// https://drafts.csswg.org/resize-observer-1/#dom-resizeobserver-disconnect
void ResizeObserver::disconnect()
{
// FIXME: Implement
// 1. Clear the [[observationTargets]] list.
m_observation_targets.clear();
// 2. Clear the [[activeTargets]] list.
m_active_targets.clear();
}
void ResizeObserver::invoke_callback(Vector<JS::NonnullGCPtr<ResizeObserverEntry>>& entries) const