I'm having an iframe
containing few anchors with target="_blank"
attribute.
Whenever user clicks that anchor which will cause opening a new tab I would like to control that behaviour and handle it in my function.
(anchor URL's are always pointing to my website, not external ones)
I have tried using the onunload
event, however it appears that its working only when action happens within that certain tab and not a new one.