wp_back/wp-content/plugins/visual-portfolio/build/assets/js/lazyload.js

1 line
322 B
JavaScript
Raw Normal View History

2024-05-20 15:37:46 +03:00
document.addEventListener("lazybeforesizes",(e=>{if(!e.detail||!e.detail.width||!e.target)return;const t=e.target.closest(":not(picture)");t&&(e.detail.width=t.clientWidth||e.detail.width)})),document.addEventListener("lazybeforeunveil",(e=>{const t=e.target.previousElementSibling;t&&t.matches("noscript")&&t.remove()}));