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

566
Visualizações
msSaveOrOpenBlob property doesn't exist on type Navigator angular 13

The property msSaveOrOpenBlob doesn't exist on type Navigator after updating to the angular 13.

I know the Navigator.msSaveOrOpenBlob is being deprecated as per https://developer.mozilla.org/en-US/docs/Web/API/Navigator/msSaveOrOpenBlob#browser_compatibility

I had an angular 12 application, now I am migrating to angular 13 and typescript have been updated to the latest version, but facing the issue of The property msSaveOrOpenBlob doesn't exist on type Navigator

what will be the alternate code for the below

if (window.navigator.msSaveOrOpenBlob) {
            navigator.msSaveOrOpenBlob(blob, filename);
        }
about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

Found some of the references

https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/1029 https://github.com/microsoft/TypeScript/issues/45612

Use the declaration merging and declare the types locally in your project work.

about 4 years ago · Juan Pablo Isaza Relatório

0

let newVariable: any = window.navigator;
var newBlob = new Blob([res.body], { type: "application/csv" });
if (newVariable && newVariable.msSaveOrOpenBlob) {
    newVariable.msSaveOrOpenBlob(newBlob);
    return;
}
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