Trying to prepend data inside a text box in Chrome and Firefox works. Get error: SCRIPT438: Object doesn't support property or method 'prepend' in IE11 and Edge. Thx
function init_TGs(){
if (confirm("Initialize TinyG's?")){
$.ajax({
type: 'POST',
url: "init_TGs",
data: 'None',
success: function(result){
if (result != ''){
var rslt= result;
var item = document.getElementById('TextArea1');
item.prepend(rslt);
}}
});
}};
Or, instead of adding a new polyfill you can use insertBefore
function which is supported by all browsers:
var rslt= result;
var item = document.getElementById('TextArea1');
item.insertBefore(rslt, item.childNodes[0]);