public class JavaScriptUrlReferenceHeaderItem extends AbstractJavaScriptReferenceHeaderItem
HeaderItem
for script tags that are rendered using a fixed URL, for example resources
from an external site or context relative urls.Constructor and Description |
---|
JavaScriptUrlReferenceHeaderItem(String url,
String id,
boolean defer,
String charset,
String condition)
Creates a new
JavaScriptUrlReferenceHeaderItem . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Iterable<?> |
getRenderTokens() |
String |
getUrl() |
int |
hashCode() |
void |
render(Response response)
Renders the
HeaderItem to the response. |
String |
toString() |
getCharset, isAsync, isDefer, setAsync, setCharset, setDefer
forReference, forReference, forReference, forReference, forReference, forReference, forReference, forReference, forScript, forScript, forUrl, forUrl, forUrl, forUrl, forUrl, getCondition, getId, internalRenderJavaScriptReference, setId
getDependencies, getProvidedResources
public JavaScriptUrlReferenceHeaderItem(String url, String id, boolean defer, String charset, String condition)
JavaScriptUrlReferenceHeaderItem
.url
- context-relative url of the the javascript resourceid
- id that will be used to filter duplicate reference (it's still filtered by URL
too)defer
- specifies that the execution of a script should be deferred (delayed) until after
the page has been loaded.charset
- a non null value specifies the charset attribute of the script tagcondition
- the condition to use for Internet Explorer conditional comments. E.g. "IE 7".public String getUrl()
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 boolean equals(Object o)
equals
in class AbstractJavaScriptReferenceHeaderItem
public int hashCode()
hashCode
in class AbstractJavaScriptReferenceHeaderItem
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.