How can I tell if HTML element that was teleported to body was originnaly in specific component?
Component.vue:
<template>
<div class="parent">
<p>This is parent</p>
<teleport>
<p>This is teleported content</p>
</teleport>
</div>
</template>
Document:
<body>
<div id="app">
<div class="parent">
<p>
This is parent
</p>
</div>
</div>
<p class="teleported">This is teleported</p>
</body>
So now in my code I need to somehow detect that p.teleported is actually inside of Component.vue
What I'm trying to achieve is to detect clicks outside of such components. Existing solutions doesn't work because my components can be nested and teleported multiple times and I have to trace all of them.