There isn't a cross platform way to do this.

But, In IE you can use JSNI and do something like:

var ss = $doc.createStyleSheet();
s.cssText = myCSS;

and everywhere else, just use the DOM classes to create a style  
element, set type to "text/css" and set the inner text to your CSS  
then append it to the document head.

-jason

On Nov 7, 2008, at 8:13 AM, samsus wrote:

>
> Hello everyone,
>
> Im trying to do an app where the user can dynamically load a html and
> its respective stylesheet. (after ,say, clicking a button). How can
> this be done?
> im using RequestBuilder to load the html, however when i used to load
> the css, the stylesheet is not apllied, i also tryed:
>
> private native void loadCSS(String cssHref) /*-{
>    document.write('<link rel="stylesheet" type="text/css" href="' +
> cssHref + '">');
> }-*/;
>
> without results.
>
> Any ideas?
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to