🔎 Intersection Observer API wrapper for Blazor applications
MIT License
Bot releases are visible (Hide)
Published by ljbc1994 about 3 years ago
Thanks to:
@epicturkey
Published by ljbc1994 about 3 years ago
Helpful error messages will now appear if the consumer fails to provide:
Published by ljbc1994 about 3 years ago
Ljbc1994.Blazor.IntersectionObserver
to avoid namespace conflicts with Blazor libraries.Published by ljbc1994 over 3 years ago
Published by ljbc1994 over 3 years ago
Published by ljbc1994 over 3 years ago
IntersectionObserve
now requires a reference to the node it's observing, means the component only deals with observing and not polluted with Class
or Style
.Now the component's context includes a reference which needs to be provided with the element that needs to be observed.
@using Blazor.IntersectionObserver
<IntersectionObserve>
<div @ref="context.Ref.Current">
Hey... I'm @(context.IsIntersecting ? "in view": "out of view")
</div>
</IntersectionObserve>
dispose
method on the service rather than disconnect
. Disconnect
follows the API and removes any elements that are being observed but does not remove the observer.IntersectionObserve
instance will have their own observer.Published by ljbc1994 almost 4 years ago
Published by ljbc1994 almost 4 years ago