I had the same question, but I made some changes to charge the title bar tag dynamically. I used this code:
LinkElement link = Document.get().createLinkElement(); link.setHref("css/home.css");
I don't know if this is the most elegant solution, but it works!
EDIT: If you need to change any current item, you must do this:
NodeList<Element> links = Document.get().getElementsByTagName("link"); for(int i = 0; i < links.getLength(); i++){ LinkElement l = (LinkElement)links.getItem(i); if( l.toString().contains("href_to_replace.css") ){ l.setHref("new_href.css"); break; } }
source share