Firefox doesn't allow any action to be performed on any element until its not there in DOM. Here is a code about adding the dynamic hyperlink to the DOM and make it work on all the browser.
$(document).ready(function(){
$("#download_button").click(function()
{
var req = new XMLHttpRequest();
req.open("GET", "/41138.docx", true);
req.responseType = "blob";
req.onload = function (event) {
alert("hi");
var blob = req.response;
var link=document.createElement('a');
link.href=window.URL.createObjectURL(blob);
link.download="sample.docx";
$("body").append(link);
link.click();
};
req.send();
});
});
En esta página del sitio puede ver el video en línea Dynamic hyperlink issue with Firefox | Dynamic element issue with different browsers de Duración hora minuto segunda en buena calidad , que subió el usuario Yogesh Kumbhat 31 julio 2019, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 14 veces y le gustó 0 a los espectadores. Disfruta viendo!