Browser Popup

Is there a way to capture the pop-up confirmation event generated by browsers.

I have an application in which I try to open a file in Visual Studio code using:

<a href="vscode://file/Users/abc/Desktop/about.html">Launch VS Code</a>

When you click on this link, the browser asks me Open Visual Studio Code? and yes or no.

Can I capture this user event in a popup window and perform another task? thanks in advance

----------------- Partial Solution -----------------

<a (click)="openVSCode()">Launch VS Code</a>

function openVSCode(){
  window.open('vscode://file/Users/abc/Desktop');
  window.open('vscode://file/Users/abc/Desktop/about.html');
}

The only drawback to this is that pop-ups with two browsers will open simultaneously. Otherwise, this fix works.

+4

Source: https://habr.com/ru/post/1680947/


All Articles