From f481b646e565a3f4352e3069cde15162643e6ae5 Mon Sep 17 00:00:00 2001 From: Thomas Navarro <36193187+thomasnavarro@users.noreply.github.com> Date: Wed, 29 Mar 2023 07:33:36 +0200 Subject: [PATCH] Docs upd: custom-content.md (#2024) Fix event names to use the WebP format --- docs/custom-content.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/custom-content.md b/docs/custom-content.md index 2e148671c..14bf75788 100644 --- a/docs/custom-content.md +++ b/docs/custom-content.md @@ -34,7 +34,7 @@ lightbox.addFilter('itemData', (itemData, index) => { }); // use instead of -lightbox.on('contentLoadImage', (e) => { +lightbox.on('contentLoad', (e) => { const { content, isLazy } = e; if (content.data.webpSrc) { @@ -79,7 +79,7 @@ lightbox.on('contentLoadImage', (e) => { // by default PhotoSwipe appends , // but we want to append -lightbox.on('contentAppendImage', (e) => { +lightbox.on('contentAppend', (e) => { const { content } = e; if (content.pictureElement && !content.pictureElement.parentNode) { e.preventDefault();