public class OnDomReadyHeaderItem extends HeaderItem
HeaderItem
for scripts that need to be executed directly after the DOM has been built,
but before external resources, such as images, are loaded.Constructor and Description |
---|
OnDomReadyHeaderItem()
Constructor.
|
OnDomReadyHeaderItem(CharSequence javaScript)
Construct.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static OnDomReadyHeaderItem |
forScript(CharSequence javaScript)
Creates a
OnDomReadyHeaderItem for the script. |
List<HeaderItem> |
getDependencies() |
CharSequence |
getJavaScript() |
Iterable<?> |
getRenderTokens() |
int |
hashCode() |
void |
render(Response response)
Renders the
HeaderItem to the response. |
String |
toString() |
getProvidedResources
public OnDomReadyHeaderItem()
public OnDomReadyHeaderItem(CharSequence javaScript)
javaScript
- public static OnDomReadyHeaderItem forScript(CharSequence javaScript)
OnDomReadyHeaderItem
for the script.javaScript
- The script to execute on the DOM ready event.OnDomReadyHeaderItem
.public CharSequence getJavaScript()
public void render(Response response)
HeaderItem
HeaderItem
to the response.render
in class HeaderItem
public Iterable<?> getRenderTokens()
getRenderTokens
in class HeaderItem
HeaderItem
can be identified by. If any of the tokens has
already been rendered, this HeaderItem
will not be rendered.public List<HeaderItem> getDependencies()
getDependencies
in class HeaderItem
HeaderItem
has. Dependencies will always be rendered
before the item itself.Copyright © 2006–2022 Apache Software Foundation. All rights reserved.