On Thu, Mar 19, 2009 at 9:40 AM, John LaBanca <[email protected]> wrote: > I agree with all of the general comments: > - Need more doc and an example > - Need to prevent unintentional style affects > > In terms of moving this into GWT, the list of concerns on this email are > what I'm worried about. Basically, there are a lot of concerns that could > arrise, and I'd like to hash them out in the incubator first.
Okey doke, though I think this needs another round before incubator. > > On reason for using the link/div method instead of an XHR is because the > waitForStyleSheet() method is probably more useful than loading a new style > sheet. In general, people will include their style sheets when they load > the page, but they might want to know when the style sheet has finished > loading. If we use XHR, we would still require a custom style attribute to > check if the styles have already been loaded. I'm still left wondering if this technique actually works. Are you confident that browsers don't do incremental interpretation of large css files? Re: the fragility of a div based style, does it really have to be a div? If you make an element with an arbitrary illegal tag, <johnWasHere class="referenceClass"/>, will the browsers handle that? Safari and FF3 do. > > Thanks, > John LaBanca > [email protected] > > > On Wed, Mar 18, 2009 at 11:20 PM, <[email protected]> wrote: >> >> http://gwt-code-reviews.appspot.com/13802/diff/1/3 >> File src/com/google/gwt/gen2/styleloader/client/StyleSheetLoader.java >> (right): >> >> http://gwt-code-reviews.appspot.com/13802/diff/1/3#newcode110 >> Line 110: private static native HeadElement getHeadElement() >> On 2009/03/19 00:08:01, rjrjr wrote: >>> >>> If we put this in trunk, how about adding a getHead() method to >> >> Document instead >>> >>> of doing this? >> >> This method will fail in Safari if there is no <head> element (Firefox >> always seems to insert one) >> >> http://gwt-code-reviews.appspot.com/13802 > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
