I'm trying to use the document.write javascript function to set an external css file in my template, but, I want to do this via Twig just like this:
document.write('<link href="{{ asset('bundles/activos/css/app-orange.css') }}" rel="stylesheet" >');
But it does not work. Why this document.write function is not working? Can I put that Twig code in there?
Or what is the best way to pass a css route with Twig to a document.write javascript function?
Sorry if my english is not good. I hope you understand. Thanks.
twigtemplate or in an externaljsfile?