Now this is a complicated issue to explain, I will try my best.
I have a popover from which I want to uniquely identify a click event if it is from inside or outside the popover.
My first approach: I enveloped the entire popover with a div with an id, say "unique".
So, I bound the click event with a host listener for which I will get an event object. So, if I traverse the event.path --- this contains an array of objects --- inside one of the indexes of these objects lies a field id, which will give me the name of my id.
Note: this index will be always dynamic- but the id will be guaranteed in one of the index. I need to traverse till this id. Please help. I have attached some images for better visualization.
The host listener:
The event object:
By expanding this we get the unique parent id:


