0
I need to open an external site and when the user closes this window I will have to capture an element.
The problem is that it is not going through the log inside onbeforeunload...
My code in the stackblitz
  abrir() {
    const w = window.open(
      `https://servicos.receita.fazenda.gov.br/Servicos/CPF/ConsultaSituacao/ConsultaPublica.asp?cpf=004.000.343-51&nascimento=14/02/1986`,
      "",
      "width=800,height=4600"
    );
    w.onbeforeunload = function() {
      console.log(`èfwefw`)
     
    };
  }