cotton123236 / zoomist

Zoomist is a library built with TypeScript that allows you to create zoom elements on website quickly and easily.
https://zoomist.vercel.app/
MIT License
104 stars 23 forks source link

Does not work inside ShadowRoot #50

Open marvinscharle opened 1 month ago

marvinscharle commented 1 month ago

The method isElementExist uses document.contains to check if the target element exists.

However, if Zoomist is run inside ShadowRoot, the target element is not inside document. Thus, the check fails and raises immediately an error.

It would be nice, if the check could be adjusted to allow usage inside ShadowRoot.

Thank you and keep up the good work! :-)

cotton123236 commented 1 month ago

@marvinscharle Thanks for your suggestion! I'll fix it when I have some free time.