You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Div which is hidden until the user click a button. I only load the images on the at the time I click the button.
This appears to cause the images not to render, I am guessing because the polyfill has already been performed on the images. Is there a way of progmatically calling the polyfill after the images are drawn in the div?
The text was updated successfully, but these errors were encountered:
@chumanfu thanks a lot for your request. I've just released a beta of the new version 2.0 that would provide this feature - you could install it via npm i loading-attribute-polyfill@beta
Than there's a public method that you might call with a query for each of the related DOM nodes, like e.g.: loadingAttributePolyfill.prepareElement(document.querySelector('main noscript.loading-lazy'));
Do you have the chance to check this out regarding your usecase?
@mfranzke thanks for the polyfill. adding images dynamically seems to be broken. you can see this by visiting the demo url and clicking on the "Add dynamic image underneath" button while looking at the network tab. the dynamically added image is immediately downloaded without the need to scroll down. is there any workaround to fix this?
Hi.
Div which is hidden until the user click a button. I only load the images on the at the time I click the button.
This appears to cause the images not to render, I am guessing because the polyfill has already been performed on the images. Is there a way of progmatically calling the polyfill after the images are drawn in the div?
The text was updated successfully, but these errors were encountered: