One problem stopping Mobiscroll calendar working inside a LWC? is described in the PS to that question. An equivalent of element.matches (AKA element.matchesSelector
) needs to be implemented for an LWC LightningElement, as neither of those methods is supported. There is also no parentNode
property and AFAIK you can't access the document
. These restrictions block the common polyfill and its parentNode
equivalent.
So I'm starting to form the opinion that there is no way to implement element.matches logic applied to an LWC LightningElement
given the access restrictions. Is there a way?