For people who will going to look for 'How to change dynamically content on pseudo element adding new line sign" here's answer
Html chars like
will not work appending them to html using JavaScript because those characters are changed on document render
Instead you need to find unicode representation of this characters which are U+000D and U+000A so we can do something like
var el = document.querySelector('div');_x000D_
var string = el.getAttribute('text').replace(/, /, '\u000D\u000A');_x000D_
el.setAttribute('text', string);
_x000D_
div:before{_x000D_
content: attr(text);_x000D_
white-space: pre;_x000D_
}
_x000D_
<div text='I want to break it in javascript, after comma sign'></div>
_x000D_
Hope this save someones time, good luck :)