Hello,
I got the following error in the console after the execution of the logic after checking is the current item is observed.
Microsoft.JSInterop.JSException: Failed to execute 'observe' on 'IntersectionObserver': parameter 1 is not of type 'Element'.
TypeError: Failed to execute 'observe' on 'IntersectionObserver': parameter 1 is not of type 'Element'.
I apply the code which I use.
<div @ref="@this.Reference">
Some data
</div>
public ElementReference Reference { get; set; } = new ElementReference(Guid.NewGuid().ToString());
await ObserverService.Observe(Reference, async (entries) =>
{
if (entries.FirstOrDefault().IsIntersecting)
{
// Login execution
}
});
Regards,
Simeon Valev
Hello,
I got the following error in the console after the execution of the logic after checking is the current item is observed.
I apply the code which I use.
public ElementReference Reference { get; set; } = new ElementReference(Guid.NewGuid().ToString());Regards,
Simeon Valev