Class StyleInjector

java.lang.Object
com.google.gwt.dom.client.StyleInjector

public class StyleInjector extends Object
Used to add stylesheets to the document. The one-argument versions of inject(java.lang.String), injectAtEnd(java.lang.String), and injectAtStart(java.lang.String) use Scheduler.scheduleFinally(com.google.gwt.core.client.Scheduler.RepeatingCommand) to minimize the number of individual style elements created.

The api here is a bit redundant, with similarly named methods returning either void or StyleElement — e.g., void inject(String) v. StyleElement injectStylesheet(String). The methods that return StyleElement are not guaranteed to work as expected on Internet Explorer. Because they are still useful to developers on other browsers they are not deprecated, but IE developers should avoid the methods with StyleElement return values (at least up until, and excluding, IE10).