Skip to content

Use MutationObserver to automatically find new images injected into the page #24

Open
@13twelve

Description

Could possibly replace, or at least assist (by automating) the requirement to document.addEventListener('page:updated', () => lazyloading.reset()); when injecting new content.

MutationObserver could be used to add entries to the IntersectionObserver when injected into the page and also to remove entries from the IntersectionObserver if content is removed from the page.

A17 Behaviors uses one - I think the implementation will be similar here.

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions