Skip to content

Threshold value having no effect (SvelteKit) #37

@hardingjam

Description

@hardingjam
<IntersectionObserver once element={node} let:intersecting threshold={0.1}>
		<div bind:this={node}>
			{#if intersecting}
				<img
					on:load={imageIsLoaded}
					src={image}
					alt={name}
				/>
			{/if}
		</div>
	</IntersectionObserver>

Regardless of the low threshold, the images only load when 100% intersected with the viewport. Is this a known issue, or am I doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions