mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 19:55:06 +00:00

Let's stop putting generic types and AOs from the Web IDL spec into the Bindings namespace and directory in LibWeb, and instead follow our usual naming rules of 'directory = namespace = spec name'. The IDL namespace is already used by LibIDL, so Web::WebIDL seems like a good choice.
51 lines
1.4 KiB
C++
51 lines
1.4 KiB
C++
/*
|
|
* Copyright (c) 2021, Tim Flynn <trflynn89@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibWeb/DOM/Element.h>
|
|
#include <LibWeb/HTML/Window.h>
|
|
#include <LibWeb/IntersectionObserver/IntersectionObserver.h>
|
|
|
|
namespace Web::IntersectionObserver {
|
|
|
|
// https://w3c.github.io/IntersectionObserver/#dom-intersectionobserver-intersectionobserver
|
|
JS::NonnullGCPtr<IntersectionObserver> IntersectionObserver::create_with_global_object(HTML::Window& window, WebIDL::CallbackType* callback, IntersectionObserverInit const& options)
|
|
{
|
|
// FIXME: Implement
|
|
(void)callback;
|
|
(void)options;
|
|
|
|
return *window.heap().allocate<IntersectionObserver>(window.realm(), window);
|
|
}
|
|
|
|
IntersectionObserver::IntersectionObserver(HTML::Window& window)
|
|
: PlatformObject(window.realm())
|
|
{
|
|
set_prototype(&window.cached_web_prototype("IntersectionObserver"));
|
|
}
|
|
|
|
IntersectionObserver::~IntersectionObserver() = default;
|
|
|
|
// 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
|
|
}
|
|
|
|
}
|