I'm developing a service, which renders a series of Resources on a page. Resource - is a record in database, which has "url" and "visited" fields.
When user click on resource url, it will be marked as "visited: true" in database via sending ajax PUT request. It works well, until user decides to open url in new tab. When I open context menu for given url and choose "Open in new Tab", javascript does't catches this event and record in database will not be updated.
In this question Javascript Event for "Open in new Tab" they adviced to change "click" handler to "onmousedown". But, this handler catches just opening context menu, even, when I close it, without choosing anything.
Is there any standard way to handle "Open in new tab" event?
Thanks!