An easy to use vanilla JavaScript plug-in without production dependencies for displaying images, videos, or, through custom sources, anything you want in a clean overlying box.
MIT License
351
stars
30
forks
source link
refreshFsLightbox not working on shadow DOM / web component #176
I'm using HTML's templating functionality to create a custom image-gallery component. However, running refreshFsLightbox() after instantiating a component seems to have no effect: the newly created components do not get a click event listener attached to them.
I'm using HTML's templating functionality to create a custom image-gallery component. However, running
refreshFsLightbox()
after instantiating a component seems to have no effect: the newly created components do not get aclick
event listener attached to them.HTML:
JS:
I have confirmed that
refreshFsLightbox()
is invoked, it just skips anything that's inside of a shadow DOM.(Side note: I'm still learning web components and probably doing some things in a roundabout way)