Hello! I am trying to rewrite part of our JS code to Kotlin but I am stuck on IntersectionObserver. When I try to use callback this error occurs:
How can I implement IntersectionObserver in Kotlin JS?
a
Artem Kobzar
03/14/2024, 4:00 PM
IntersectionObserverCallback is just an alias to a functional type. So, you can define it as a lambda or an anonymous function.
Copy code
val callback: IntersectionObserverCallback = { entries, observer ->
TODO()
}