There's a similar discussion here : CSS data attribute new line character & pseudo-element content value
Problem is, this didn't work if the attr is set via Javascript
I understand that \A
doesn't work in attr, but now 

doesn't work on attr via Javascript, is there any way to get this working?
const ele = document.getElementById('my-ele')
ele.classList.add('loading');
ele.setAttribute('loading-text', 'Your file is being generated...
This may take some minutes');
.loading::after {
content: attr(loading-text);
}
<div id="my-ele"></div>