Skip to content

Conversation

@sjorsdonkers
Copy link
Contributor

@sjorsdonkers sjorsdonkers commented May 5, 2025

Implements:

  • IntersectionObserver
  • IntersectionObserverEntry
  • Element.getClientRects

Changed the client's width +1 to make sure all elements are inside. Should we instead start counting from 0?

Notes:

  1. We return DOMRect instead of its parent class DOMRectReadOnly.
  2. We call the callback immediately, we do not wait for any event that could cause an intersection change, like scrolling, resizing, DOM modification.
  3. We always indicate the root and target element are fully intersecting

@sjorsdonkers sjorsdonkers marked this pull request as ready for review May 5, 2025 14:52
@sjorsdonkers sjorsdonkers force-pushed the NativeIntersectionObserver branch from a92a032 to e32d35b Compare May 6, 2025 09:28
@karlseguin karlseguin merged commit 3095f21 into main May 6, 2025
12 checks passed
@karlseguin karlseguin deleted the NativeIntersectionObserver branch May 6, 2025 09:36
@github-actions github-actions bot locked and limited conversation to collaborators May 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants