Package org.apache.wicket.markup.head
Class AbstractJavaScriptReferenceHeaderItem
- java.lang.Object
-
- org.apache.wicket.markup.head.HeaderItem
-
- org.apache.wicket.markup.head.AbstractCspHeaderItem
-
- org.apache.wicket.markup.head.JavaScriptHeaderItem
-
- org.apache.wicket.markup.head.AbstractJavaScriptReferenceHeaderItem
-
- All Implemented Interfaces:
Serializable
,ISubresourceHeaderItem
,IClusterable
- Direct Known Subclasses:
JavaScriptReferenceHeaderItem
,JavaScriptUrlReferenceHeaderItem
public abstract class AbstractJavaScriptReferenceHeaderItem extends JavaScriptHeaderItem implements ISubresourceHeaderItem
AHeaderItem
that renders a JavaScript reference.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractJavaScriptReferenceHeaderItem()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getCharset()
CrossOrigin
getCrossOrigin()
String
getIntegrity()
JavaScriptReferenceType
getType()
int
hashCode()
protected void
internalRenderJavaScriptReference(Response response, String url)
boolean
isAsync()
boolean
isDefer()
AbstractJavaScriptReferenceHeaderItem
setAsync(boolean async)
AbstractJavaScriptReferenceHeaderItem
setCharset(String charset)
AbstractJavaScriptReferenceHeaderItem
setCrossOrigin(CrossOrigin crossOrigin)
AbstractJavaScriptReferenceHeaderItem
setDefer(boolean defer)
AbstractJavaScriptReferenceHeaderItem
setIntegrity(String integrity)
AbstractJavaScriptReferenceHeaderItem
setType(JavaScriptReferenceType type)
-
Methods inherited from class org.apache.wicket.markup.head.JavaScriptHeaderItem
forReference, forReference, forReference, forScript, forUrl, forUrl, getId, setId
-
Methods inherited from class org.apache.wicket.markup.head.AbstractCspHeaderItem
getNonce, setNonce
-
Methods inherited from class org.apache.wicket.markup.head.HeaderItem
getDependencies, getProvidedResources, getRenderTokens, render
-
-
-
-
Constructor Detail
-
AbstractJavaScriptReferenceHeaderItem
public AbstractJavaScriptReferenceHeaderItem()
-
-
Method Detail
-
isAsync
public boolean isAsync()
- Returns:
- if the script should be loaded and executed asynchronously
-
setAsync
public AbstractJavaScriptReferenceHeaderItem setAsync(boolean async)
-
isDefer
public boolean isDefer()
- Returns:
- if the execution of a script should be deferred (delayed) until after the page has been loaded.
-
setDefer
public AbstractJavaScriptReferenceHeaderItem setDefer(boolean defer)
-
getCharset
public String getCharset()
- Returns:
- the optional value of the charset attribute of the script tag
-
setCharset
public AbstractJavaScriptReferenceHeaderItem setCharset(String charset)
-
getCrossOrigin
public CrossOrigin getCrossOrigin()
- Specified by:
getCrossOrigin
in interfaceISubresourceHeaderItem
-
setCrossOrigin
public AbstractJavaScriptReferenceHeaderItem setCrossOrigin(CrossOrigin crossOrigin)
- Specified by:
setCrossOrigin
in interfaceISubresourceHeaderItem
-
getIntegrity
public String getIntegrity()
- Specified by:
getIntegrity
in interfaceISubresourceHeaderItem
-
setIntegrity
public AbstractJavaScriptReferenceHeaderItem setIntegrity(String integrity)
- Specified by:
setIntegrity
in interfaceISubresourceHeaderItem
-
getType
public JavaScriptReferenceType getType()
-
setType
public AbstractJavaScriptReferenceHeaderItem setType(JavaScriptReferenceType type)
-
internalRenderJavaScriptReference
protected final void internalRenderJavaScriptReference(Response response, String url)
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classJavaScriptHeaderItem
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classJavaScriptHeaderItem
-
-