Shadow DOM problems
When using PhotoSwipe inside a shadow root, zoom functionality fails when clicking on an image, and closing the gallery fails when clicking on the background. This issue arises because the event is attached to the window using "events.add(window)". Consequently, the event's target becomes the host element of the shadow root, rather than the element clicked by the user. This leads to the problem because PhotoSwipe relies on the presence of classes like 'pswp__img', 'pswp__item', 'pswp__zoom-wrap' when processing a click, which the host element lacks. The solution lies in attaching the event not to the window, but to an element within the shadow root. Is it possible to specify the element to which events are attached in the options?