public class Script extends java.lang.Object implements HeadElement
| Modifier and Type | Class and Description |
|---|---|
static class |
Script.Type
Indicates the MIME type of the script
|
| Constructor and Description |
|---|
Script()
Default constructor
|
Script(java.lang.String src)
Short constructor for url JavaScript
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getBody() |
java.lang.String |
getCharset() |
java.lang.String |
getSrc() |
Script.Type |
getType() |
java.lang.String |
getTypeName() |
boolean |
isDefer() |
boolean |
isJarResource() |
Script |
setBody(java.lang.String body) |
Script |
setCharset(java.lang.String charset) |
Script |
setDefer(boolean defer) |
Script |
setJarResource(boolean jarResource) |
Script |
setSrc(java.lang.String src) |
Script |
setType(Script.Type type) |
void |
writeHTML()
Writes HTML code of the element.
|
public Script()
public Script(java.lang.String src)
src - url Defines a URL to a file that contains the script (instead
of inserting the script into your HTML document, you can refer
to a file that contains the script)public java.lang.String getTypeName()
getTypeName in interface HeadElementpublic void writeHTML()
HeadElementwriteHTML in interface HeadElementpublic java.lang.String getBody()
public Script setBody(java.lang.String body)
body - the body to setpublic java.lang.String getCharset()
public Script setCharset(java.lang.String charset)
charset - the charset to setpublic boolean isDefer()
public Script setDefer(boolean defer)
defer - the defer to setpublic java.lang.String getSrc()
public Script setSrc(java.lang.String src)
src - the src to setpublic Script.Type getType()
public Script setType(Script.Type type)
type - the type to setpublic boolean isJarResource()
public Script setJarResource(boolean jarResource)
jarResource - if resource refers to jar