mirror of
https://github.com/S2-/ejs-render-remote
synced 2025-08-02 20:50:04 +02:00
outerHTML vs replaceWith
This commit is contained in:
@@ -33,14 +33,14 @@
|
|||||||
|
|
||||||
var r = uuidv4();
|
var r = uuidv4();
|
||||||
getTemplateFn.then(function(template) {
|
getTemplateFn.then(function(template) {
|
||||||
document.getElementById(r).outerHTML = ejs.render(
|
$('#' + r).replaceWith(ejs.render(
|
||||||
template,
|
template,
|
||||||
data,
|
data,
|
||||||
{
|
{
|
||||||
cache: true,
|
cache: true,
|
||||||
filename: templateUrl
|
filename: templateUrl
|
||||||
}
|
}
|
||||||
);
|
));
|
||||||
});
|
});
|
||||||
|
|
||||||
return '<span class="ejs-templateplaceholder" style="display: none;" id="' + r + '"></span>';
|
return '<span class="ejs-templateplaceholder" style="display: none;" id="' + r + '"></span>';
|
||||||
@@ -69,5 +69,5 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
return d;
|
return d;
|
||||||
}
|
};
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
Reference in New Issue
Block a user