Is there a way to load an external stylesheet by setting locale or other user action? I would like to change the style presentation based on a u开发者_如何学Goser input.
You have to use JSNI and DOM methods to create (and add to DOM) a new <link>
tag:
private native void loadCSS (String cssHref) /*-{
document.write('<link rel="stylesheet" type="text/css" href="' +
cssHref + '">');
}-*/;
精彩评论