
This is a monster patch that turns all EventTargets into GC-allocated PlatformObjects. Their C++ wrapper classes are removed, and the LibJS garbage collector is now responsible for their lifetimes. There's a fair amount of hacks and band-aids in this patch, and we'll have a lot of cleanup to do after this.
42 lines
1.1 KiB
C++
42 lines
1.1 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(HTML::Window&, Bindings::CallbackType* callback, IntersectionObserverInit const& options)
|
|
{
|
|
// FIXME: Implement
|
|
(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
|
|
}
|
|
|
|
}
|