mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 06:54:57 +00:00

This patch moves the following things to being GC-allocated: - Bindings::CallbackType - HTML::EventHandler - DOM::IDLEventListener - DOM::DOMEventListener - DOM::NodeFilter Note that we only use PlatformObject for things that might be exposed to web content. Anything that is only used internally inherits directly from JS::Cell instead, making them a bit more lightweight.
43 lines
1.2 KiB
C++
43 lines
1.2 KiB
C++
/*
|
|
* Copyright (c) 2021, Tim Flynn <trflynn89@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibWeb/DOM/Element.h>
|
|
#include <LibWeb/IntersectionObserver/IntersectionObserver.h>
|
|
|
|
namespace Web::IntersectionObserver {
|
|
|
|
// https://w3c.github.io/IntersectionObserver/#dom-intersectionobserver-intersectionobserver
|
|
NonnullRefPtr<IntersectionObserver> IntersectionObserver::create_with_global_object(JS::GlobalObject& global_object, Bindings::CallbackType* callback, IntersectionObserverInit const& options)
|
|
{
|
|
// FIXME: Implement
|
|
(void)global_object;
|
|
(void)callback;
|
|
(void)options;
|
|
|
|
return adopt_ref(*new IntersectionObserver);
|
|
}
|
|
|
|
// https://w3c.github.io/IntersectionObserver/#dom-intersectionobserver-observe
|
|
void IntersectionObserver::observe(DOM::Element& target)
|
|
{
|
|
// FIXME: Implement
|
|
(void)target;
|
|
}
|
|
|
|
// https://w3c.github.io/IntersectionObserver/#dom-intersectionobserver-unobserve
|
|
void IntersectionObserver::unobserve(DOM::Element& target)
|
|
{
|
|
// FIXME: Implement
|
|
(void)target;
|
|
}
|
|
|
|
// https://w3c.github.io/IntersectionObserver/#dom-intersectionobserver-disconnect
|
|
void IntersectionObserver::disconnect()
|
|
{
|
|
// FIXME: Implement
|
|
}
|
|
|
|
}
|