Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

216
Visualizações
LaunchUriAsync throwing exception when used in JavaScript

I am trying to call LaunchUriAsync from a cshtml view using JavaScript code. Below is my code.

try {
    let appStatus = Windows.System.Launcher.LaunchUriAsync(new Windows.Foundation.Uri("https://www.google.com")).done(
        function (success) {
            console.log("launch complete");
            if (success) {
                console.log("launch success")
            } else {
                console.log("launch failed")
            }
        }, function (err) {
            console.log("launch error")
        });
}
catch (ex) {
    console.log("launch throws")
    console.log(JSON.stringify(ex))
}

I am getting the output "launch throws" but I am getting empty exception logged to console so not really understanding what is the exception that is thrown. Any idea why this might be throwing?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

launchUriAsync with a lowercase l works:

Windows.System.Launcher.launchUriAsync(new Windows.Foundation.Uri("https://www.google.com"))
    
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda