loading-attribute-polyfill icon indicating copy to clipboard operation
loading-attribute-polyfill copied to clipboard

DOM changes tracking with MutationObserver

Open OgNellis opened this issue 6 years ago • 4 comments

@mfranzke I've added DOM changes tracking with MutationObserver, which would recall 'prepareElements' method

OgNellis avatar Oct 29 '19 10:10 OgNellis

Thanks a lot for your support ! I couldn‘t check on this in detail previous to Friday.

mfranzke avatar Oct 29 '19 10:10 mfranzke

I'm mainly thinking about whether it might be better to provide an API to trigger a reinit of the functionality and offering the MutationObserver sample code, so that every site owner could implement this MutationObserver only if needed in their application and those who don't wouldn't have this Observer running at all.

What's your opinion on this?

mfranzke avatar Nov 10 '19 10:11 mfranzke

@OgNellis - sadly it took me a while to provide a solution. Do you have the chance to review my implementation provided with #96 ?

mfranzke avatar Feb 15 '21 18:02 mfranzke

@OgNellis I've released a beta version of this polyfill: loading-attribute-polyfill@latest that provides the prepareElements as a public method to be called from outside, like within a MutationObserver. Do you still have the chance to recheck this aspect? Again, sorry for the long delay.

mfranzke avatar Mar 04 '21 20:03 mfranzke