0
I am trying to make my WEB application compatible with Edge Browser. But I get the message "Object doesn’t support Property or method 'prepend'" on the console when I try to run the following code:
var li = document.createElement("li");
...
var list = document.getElementById("history");
if (this.stackHistory.size() === 0) {
list.innerHTML = "";
list.appendChild(li);
} else {
if (document.getElementById("historyorder").value === "last")
list.prepend(li); //ERROR AQUI
else
list.appendChild(li);
}
Such code worked on Google Chrome and Firefox
prepend
neither IE nor Edge supported. Confirm in the documentation– Isac
Explain more @dvd
– Sveen