Answer the question
In order to leave comments, you need to log in
How to programmatically click on a newly created link in IE 11?
Greetings.
There is such a code
var link = document.createElement('a');
angular.element(link)
.attr('href', dataUrl)
.attr('download', fileName);
if (document.createEvent) {
alert('createEvent');
var event = document.createEvent("MouseEvents");
event.initEvent("click", true, true);
link.dispatchEvent(event);
}else if (link.click()) {
alert('click');
link.click();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question