public class OnEventHeaderItem extends HeaderItem
HeaderItem
for event triggered scripts.Constructor and Description |
---|
OnEventHeaderItem(String target,
String event)
Constructor.
|
OnEventHeaderItem(String target,
String event,
CharSequence javaScript)
Construct.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static OnEventHeaderItem |
forScript(String target,
String event,
CharSequence javaScript)
Creates a
OnEventHeaderItem for the given parameters. |
CharSequence |
getCompleteJavaScript() |
List<HeaderItem> |
getDependencies() |
String |
getEvent() |
CharSequence |
getJavaScript() |
Iterable<?> |
getRenderTokens() |
String |
getTarget() |
int |
hashCode() |
void |
render(Response response)
Renders the
HeaderItem to the response. |
String |
toString() |
getProvidedResources
public OnEventHeaderItem(String target, String event)
target
- event
- public OnEventHeaderItem(String target, String event, CharSequence javaScript)
target
- event
- javaScript
- public static OnEventHeaderItem forScript(String target, String event, CharSequence javaScript)
OnEventHeaderItem
for the given parameters.target
- The target of the event handler, for example 'window' or 'document'.event
- The event itself, for example 'click'.javaScript
- The script to execute on the event.OnEventHeaderItem
.public String getTarget()
public String getEvent()
public CharSequence getJavaScript()
public void render(Response response)
HeaderItem
HeaderItem
to the response.render
in class HeaderItem
public CharSequence getCompleteJavaScript()
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.