Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
13twelve opened this issue Nov 1, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@13twelve
Copy link
Member

13twelve commented Nov 1, 2021

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.

@13twelve 13twelve added the enhancement New feature or request label Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants