Package org.htmlunit.html
Interface ScriptElement
-
- All Known Implementing Classes:
HtmlScript
public interface ScriptElement
An element which can handle scripts.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getCharsetAttribute()
Returns the value of the attributecharset
.java.lang.String
getSrcAttribute()
Returns the value of the attributesrc
.boolean
isDeferred()
Returnstrue
if this script is deferred.boolean
isExecuted()
Returns if executed.void
markAsCreatedByDomParser()
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Marks this script as created by javascript.void
setExecuted(boolean executed)
Sets if executed.boolean
wasCreatedByDomParser()
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Returns true if this frame was created by javascript.
-
-
-
Method Detail
-
isExecuted
boolean isExecuted()
Returns if executed.- Returns:
- if executed
-
isDeferred
boolean isDeferred()
Returnstrue
if this script is deferred.- Returns:
true
if this script is deferred
-
setExecuted
void setExecuted(boolean executed)
Sets if executed.- Parameters:
executed
- if executed
-
getSrcAttribute
java.lang.String getSrcAttribute()
Returns the value of the attributesrc
. Refer to the HTML 4.01 documentation for details on the use of this attribute.- Returns:
- the value of the attribute
src
or an empty string if that attribute isn't defined.
-
getCharsetAttribute
java.lang.String getCharsetAttribute()
Returns the value of the attributecharset
. Refer to the HTML 4.01 documentation for details on the use of this attribute.- Returns:
- the value of the attribute
charset
or an empty string if that attribute isn't defined.
-
markAsCreatedByDomParser
void markAsCreatedByDomParser()
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Marks this script as created by javascript. Spec: The following scripts will not execute: scripts in XMLHttpRequest's responseXML documents, scripts in DOMParser-created documents, scripts in documents created by XSLTProcessor's transformToDocument feature, and scripts that are first inserted by a script into a Document that was created using the createDocument() API
-
wasCreatedByDomParser
boolean wasCreatedByDomParser()
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Returns true if this frame was created by javascript. This is needed to handle some special IE behavior.- Returns:
- true or false
-
-