This is probably the wrong time to ask -but updating styles via the  
addition of style tags seems very limiting.

If I recall IE (cant recall which vetsion was probably 7) chokes when  
a page has more than thirty odd style elements.

Why not add new rules using StyleSheet.addRule/insertRule or appending  
the new CSS to a particular stylesheet's CSS ? Using style elements to  
"append" to a stylesheet seems a hack when proper mechanisms exist.

If the StyleInjector bundle included a mechanism to say which  
stylesheet to modify.

On 04/04/2009, at 8:49 AM, Ray Cromwell <[email protected]> wrote:

>
> I believe so. I don't see any harm. Personally, I think if you don't  
> have a <head>, your page is broken, since you don't even get a  
> <title>, but it would be nice to either throw an informative  
> exception, or inject a head in this circumstance.
>
> -Ray
>
>
> On Fri, Apr 3, 2009 at 2:46 PM, Ray Ryan <[email protected]> wrote:
> Can we add safely add head if we don't find it?
>
>
> On Fri, Apr 3, 2009 at 2:43 PM, <[email protected]> wrote:
>
> http://gwt-code-reviews.appspot.com/15803/diff/4001/4004
> File user/src/com/google/gwt/dom/client/StyleInjector.java (right):
>
> http://gwt-code-reviews.appspot.com/15803/diff/4001/4004#newcode35
> Line 35: "head").getItem(0));
> I mentioned this in another review, but this common idiom can fail if
> the user doesn't have a <head> element, which is certainly legal. Some
> browsers automatically insert a <head> if it's missing, but some  
> don't.
> I guess we could simply declare we don't support leaving out head.
>
> Might be good to assert head != null
>
>
> http://gwt-code-reviews.appspot.com/15803
>
>
>
> >

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to