twill-image icon indicating copy to clipboard operation
twill-image copied to clipboard

Use `MutationObserver` to automatically find new images injected into the page

Open 13twelve opened this issue 4 years ago • 0 comments

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 avatar Nov 01 '21 15:11 13twelve