IntersectionObserver.cpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright (c) 2021, Tim Flynn <trflynn89@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibWeb/DOM/Element.h>
  7. #include <LibWeb/IntersectionObserver/IntersectionObserver.h>
  8. namespace Web::IntersectionObserver {
  9. // https://w3c.github.io/IntersectionObserver/#dom-intersectionobserver-intersectionobserver
  10. NonnullRefPtr<IntersectionObserver> IntersectionObserver::create_with_global_object(JS::GlobalObject& global_object, JS::Value callback, IntersectionObserverInit const& options)
  11. {
  12. // FIXME: Implement
  13. (void)global_object;
  14. (void)callback;
  15. (void)options;
  16. return adopt_ref(*new IntersectionObserver);
  17. }
  18. // https://w3c.github.io/IntersectionObserver/#dom-intersectionobserver-observe
  19. void IntersectionObserver::observe(DOM::Element& target)
  20. {
  21. // FIXME: Implement
  22. (void)target;
  23. }
  24. // https://w3c.github.io/IntersectionObserver/#dom-intersectionobserver-unobserve
  25. void IntersectionObserver::unobserve(DOM::Element& target)
  26. {
  27. // FIXME: Implement
  28. (void)target;
  29. }
  30. // https://w3c.github.io/IntersectionObserver/#dom-intersectionobserver-disconnect
  31. void IntersectionObserver::disconnect()
  32. {
  33. // FIXME: Implement
  34. }
  35. }