/* * Copyright (c) 2021, Tim Flynn * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include namespace Web::IntersectionObserver { // https://w3c.github.io/IntersectionObserver/#dom-intersectionobserver-intersectionobserver JS::NonnullGCPtr IntersectionObserver::create_with_global_object(HTML::Window& window, Bindings::CallbackType* callback, IntersectionObserverInit const& options) { // FIXME: Implement (void)callback; (void)options; return *window.heap().allocate(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 } }