There're very similar questions/solutions. And I think they already answer my question with basically "no, it's not possible". But they're all more specific cases so I wanted to double check 1 last time for the general case before giving up on this approach.
Basically, I want to know when an <a href=...>
is followed.
click
event listener will capture left-click, ctrl + left-click, and keyboard activation (e.g. tab focus + enter), but not middle-click.mouseup
event listener will capture middle-click, but then I'd have to have additional logic to make sure it's not a drag event.- Neither event listener will capture right-click + 'open link in *' events.
The links won't be to the same domain, so trying to get the loaded pages to communicate on load won't be possible.