java.lang.Object | |
↳ | com.google.gwt.dom.client.StyleInjector |
Used to add stylesheets to the document. The one-argument versions of
inject(String)
, injectAtEnd(String)
, and injectAtStart(String)
use
scheduleFinally(Scheduler.RepeatingCommand)
to minimize the number of individual style
elements created.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
StyleInjector.StyleInjectorImpl | The DOM-compatible way of adding stylesheets. | ||||||||||
StyleInjector.StyleInjectorImplIE | IE doesn't allow manipulation of a style element through DOM methods. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Add a stylesheet to the document.
| |||||||||||
Add a stylesheet to the document.
| |||||||||||
Add stylesheet data to the document as though it were declared after all
stylesheets previously created by
inject(String) . | |||||||||||
Add stylesheet data to the document as though it were declared after all
stylesheets previously created by
inject(String) . | |||||||||||
Add stylesheet data to the document as though it were declared before all
stylesheets previously created by
inject(String) . | |||||||||||
Add stylesheet data to the document as though it were declared before all
stylesheets previously created by
inject(String) . | |||||||||||
This method is deprecated.
The returned StyleElement cannot be implemented consistently
across all browsers
| |||||||||||
This method is deprecated.
The returned StyleElement cannot be implemented consistently
across all browsers
| |||||||||||
This method is deprecated.
The returned StyleElement cannot be implemented consistently
across all browsers
| |||||||||||
This method is deprecated.
The associated StyleElement cannot be implemented consistently
across all browsers
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Add a stylesheet to the document.
css | the CSS contents of the stylesheet |
---|
Add a stylesheet to the document.
css | the CSS contents of the stylesheet |
---|---|
immediate | if true the DOM will be updated immediately
instead of just before returning to the event loop. Using this
option excessively will decrease performance, especially if used
with an inject-css-on-init coding pattern
|
Add stylesheet data to the document as though it were declared after all
stylesheets previously created by inject(String)
.
css | the CSS contents of the stylesheet |
---|---|
immediate | if true the DOM will be updated immediately
instead of just before returning to the event loop. Using this
option excessively will decrease performance, especially if used
with an inject-css-on-init coding pattern
|
Add stylesheet data to the document as though it were declared after all
stylesheets previously created by inject(String)
.
css | the CSS contents of the stylesheet |
---|
Add stylesheet data to the document as though it were declared before all
stylesheets previously created by inject(String)
.
css | the CSS contents of the stylesheet |
---|---|
immediate | if true the DOM will be updated immediately
instead of just before returning to the event loop. Using this
option excessively will decrease performance, especially if used
with an inject-css-on-init coding pattern
|
Add stylesheet data to the document as though it were declared before all
stylesheets previously created by inject(String)
.
css | the CSS contents of the stylesheet |
---|
This method is deprecated.
The returned StyleElement cannot be implemented consistently
across all browsers
Add a stylesheet to the document. The StyleElement returned by this method is not guaranteed to be unique.
contents | the CSS contents of the stylesheet |
---|
This method is deprecated.
The returned StyleElement cannot be implemented consistently
across all browsers
Add stylesheet data to the document as though it were declared after all
stylesheets previously created by injectStylesheet(String)
. The
StyleElement returned by this method is not guaranteed to be unique.
contents | the CSS contents of the stylesheet |
---|
This method is deprecated.
The returned StyleElement cannot be implemented consistently
across all browsers
Add stylesheet data to the document as though it were declared before any
stylesheet previously created by injectStylesheet(String)
. The
StyleElement returned by this method is not guaranteed to be unique.
contents | the CSS contents of the stylesheet |
---|
This method is deprecated.
The associated StyleElement cannot be implemented consistently
across all browsers
Replace the contents of a previously-injected stylesheet. Updating the stylesheet in-place is typically more efficient than removing a previously-created element and adding a new one. This method should be used with some caution as StyleInjector may recycle StyleElements on certain browsers.
style | a StyleElement previously-returned from
injectStylesheet(String) . |
---|---|
contents | the new contents of the stylesheet. |