What would be the disadvantage of appending the css inside the script to the document?
It would be a much simpler approach and I don't see any disadvantages, plus a request would be saved.
I mean something like:
var css =
'dialog { \
position: absolute; \
... \
';
var sEl = document.createElement('style');
sEl.appendChild(document.createTextNode(css));
document.head.append(sEl);
What would be the disadvantage of appending the css inside the script to the document? It would be a much simpler approach and I don't see any disadvantages, plus a request would be saved.
I mean something like: