I'm trying to make my WEB application compatible with the Edge Browser. But I get the message "Object does not support property or method 'prepend'" in the console as I try to execute 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);
}
This code worked in Google Chrome and Firefox