public class StyleInjectorHelper extends Object
StyleInjector
, bypass the use of com.google.gwt.resources.client.CssResource#ensureInjected()
to allow for immediate injection. These methods will
inject CssResources only once as long as all injections are performed using this helper class.Constructor and Description |
---|
StyleInjectorHelper() |
Modifier and Type | Method and Description |
---|---|
static boolean |
ensureInjected(CssResource style,
boolean immediately)
Ensures that the given CssResource is injected into the document.
|
static boolean |
isInjected(CssResource style)
Determines whether the current CssResource has already been injected by this
StyleInjectorHelper . |
public static boolean ensureInjected(CssResource style, boolean immediately)
style
- The CssResource to be injectedimmediately
- Whether to inject the the CssResource immediately. See StyleInjector#inject(boolean)
.true
if the CssResource has been injected successfully, false
otherwise. If the style
resource has already been injected, this method returns false
.public static boolean isInjected(CssResource style)
StyleInjectorHelper
.style
- The CssResource for which to determine whether injection has occurredtrue
if the CssResource has been injected, false
otherwise.Copyright © 2018. All rights reserved.