I create svg text using javascript and then set the attributes, but some of them didn't work properly :
let svgns = "http://www.w3.org/2000/svg";
let container = document.getElementById("mySVG");
var text = document.createElementNS(svgns, "text");
text.setAttributeNS(null, "x", 30);
text.setAttributeNS(null, "y", 20);
text.textContent = "Hello!";
text.style.fontSize = "50";
text.style.fontFamily = "Arial";
text.style.color = "red"; // does'nt display
text.style.textIdent = "500px"; // does'nt store in the attributes
text.style.textShadow = "5px 5px 10px pink";
text.style.textOrientation = "upright";
text.style.textOverflow = "ellipsis";
text.style.textRendering = "auto";
text.style.writingMode = "vertical-rl";
container.appendChild(text);
Then I checked the attributes with
for (let prop in text.style) {
let val = text.style[prop];
console.log(`${prop} = ${val}`);
}
The console result is :
So at the end 'red' is stored in the color attribute, but it is not displayed (text is still black in the browser - Chrome, Version 90.0.4430.93 (Build officiel) (x86_64)), and also text-indent has no values (the other attributes are well behaving).
Any clues ?


text.style.border = "solid";it is in the attributes but not displayed