I want to insert whitespace in DOM element.
For instance, I want to change this
<a></a>
to this
<a> </a>
If I manually add   to DOM element, then it renders   as a whitespace. But when I want to add this dynamically, I use innerText,
a_element.innertText = " "
and as result it doesn’t convert   to whitespace and renders it as a text (<a> </a>). How can I fix this?
Use
.innerHTMLas you need to edit the HTML of that particular link.