3 ms·
Element added to the DOM is not rendered immediately? for instance, this works as expected, the button will be blue: function myFunction() { var btn = doc
by dandare 8y ago
Element added to the DOM is not rendered immediately?
for instance, this works as expected, the button will be blue:
function myFunction() {
var btn = document.createElement("BUTTON");
var t = document.createTextNode("CLICK ME");
btn.appendChild(t);
document.body.appendChild(btn);
btn.style.color = "blue"
}