Package org.htmlunit.svg
Class SvgScript
java.lang.Object
org.htmlunit.html.DomNode
org.htmlunit.html.DomNamespaceNode
org.htmlunit.html.DomElement
org.htmlunit.svg.SvgElement
org.htmlunit.svg.SvgScript
- All Implemented Interfaces:
Serializable
,Cloneable
,ScriptElement
,Element
,Node
Wrapper for the SVG element
script
.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.htmlunit.html.DomElement
DomElement.ChildElementsIterator
Nested classes/interfaces inherited from class org.htmlunit.html.DomNode
DomNode.ChildIterator, DomNode.DescendantElementsIterator<T extends DomNode>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private boolean
static final String
The tag represented by this element.Fields inherited from class org.htmlunit.html.DomElement
ATTRIBUTE_NOT_DEFINED, ATTRIBUTE_VALUE_EMPTY, ID_ATTRIBUTE, NAME_ATTRIBUTE, SRC_ATTRIBUTE, TYPE_ATTRIBUTE, VALUE_ATTRIBUTE
Fields inherited from class org.htmlunit.html.DomNode
PROPERTY_ELEMENT, READY_STATE_COMPLETE, READY_STATE_INTERACTIVE, READY_STATE_LOADED, READY_STATE_LOADING, READY_STATE_UNINITIALIZED
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal String
Returns the value of the attributecharset
.final String
Returns the value of the attributedefer
.final String
Returns the value of the attributesrc
.protected final String
Helper for src retrieval and normalization.boolean
Returnstrue
if this script is deferred.boolean
Returns if executed.void
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Marks this script as created by javascript.void
onAllChildrenAddedToPage
(boolean postponed) Executes theonreadystatechange
handler as well as executing the script itself, if necessary.void
setExecuted
(boolean executed) Sets if executed.boolean
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Returns true if this frame was created by javascript.Methods inherited from class org.htmlunit.html.DomElement
blur, click, click, click, click, click, cloneNode, dblClick, dblClick, doClickFireChangeEvent, doClickFireClickEvent, doClickStateUpdate, fireEvent, fireEvent, focus, getAttribute, getAttributeDirect, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getAttributesMap, getChildElementCount, getChildElements, getElementsByTagName, getElementsByTagNameNS, getEventTargetElement, getFirstElementChild, getId, getLastElementChild, getNodeName, getNodeType, getSchemaTypeInfo, getStyleElement, getStyleElementCaseInSensitive, getStyleMap, getTagName, hasAttribute, hasAttributeNS, hasAttributes, isAttributeCaseSensitive, isDisabledElementAndDisabled, isEmptyXmlTagExpanded, isMouseOver, isStateUpdateFirst, matches, mouseDown, mouseDown, mouseMove, mouseMove, mouseOut, mouseOut, mouseOver, mouseOver, mouseUp, mouseUp, preventDefault, printOpeningTagContentAsXml, printXml, propagateClickStateUpdateToParent, removeAttribute, removeAttributeNode, removeAttributeNS, removeFocus, removeStyleAttribute, replaceStyleAttribute, rightClick, rightClick, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setAttributeNS, setDefaults, setId, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setInnerHtml, setNodeValue, toString, writeStyleToElement
Methods inherited from class org.htmlunit.html.DomNamespaceNode
getLocalName, getLowercaseName, getNamespaceURI, getPrefix, getQualifiedName, processImportNode, setPrefix
Methods inherited from class org.htmlunit.html.DomNode
addCharacterDataChangeListener, addDomChangeListener, appendChild, asNormalizedText, asXml, basicRemove, checkChildHierarchy, closest, compareDocumentPosition, detach, fireCharacterDataChanged, fireNodeAdded, fireNodeDeleted, getAncestors, getBaseURI, getByXPath, getByXPath, getCanonicalXPath, getChildNodes, getChildren, getDescendants, getDomElementDescendants, getEndColumnNumber, getEndLineNumber, getFeature, getFirstByXPath, getFirstByXPath, getFirstChild, getHtmlElementDescendants, getHtmlPageOrNull, getIndex, getLastChild, getNextElementSibling, getNextSibling, getNodeValue, getOwnerDocument, getPage, getParentNode, getPreviousElementSibling, getPreviousSibling, getReadyState, getScriptableObject, getSelectorList, getStartColumnNumber, getStartLineNumber, getTextContent, getUserData, getVisibleText, handles, hasChildNodes, hasFeature, insertBefore, insertBefore, isAncestorOf, isAncestorOfAny, isAttachedToPage, isDefaultNamespace, isDisplayed, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, mayBeDisplayed, normalize, notifyIncorrectness, onAddedToDocumentFragment, onAddedToPage, parseHtmlSnippet, printChildrenAsXml, querySelector, querySelectorAll, quietlyRemoveAndMoveChildrenTo, remove, removeAllChildren, removeCharacterDataChangeListener, removeChild, removeDomChangeListener, replace, replaceChild, setEndLocation, setParentNode, setReadyState, setScriptableObject, setStartLocation, setTextContent, setUserData
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.w3c.dom.Node
appendChild, compareDocumentPosition, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setPrefix, setTextContent, setUserData
-
Field Details
-
TAG_NAME
The tag represented by this element.- See Also:
-
executed_
private boolean executed_ -
createdByDomParser_
private boolean createdByDomParser_
-
-
Constructor Details
-
SvgScript
Creates a new instance.- Parameters:
namespaceURI
- the URI that identifies an XML namespacequalifiedName
- the qualified name of the element type to instantiatepage
- the page that contains this elementattributes
- the initial attributes
-
-
Method Details
-
isExecuted
public boolean isExecuted()Returns if executed.- Specified by:
isExecuted
in interfaceScriptElement
- Returns:
- if executed
-
setExecuted
public void setExecuted(boolean executed) Sets if executed.- Specified by:
setExecuted
in interfaceScriptElement
- Parameters:
executed
- if executed
-
getSrcAttribute
Returns the value of the attributesrc
. Refer to the HTML 4.01 documentation for details on the use of this attribute.- Specified by:
getSrcAttribute
in interfaceScriptElement
- Returns:
- the value of the attribute
src
or an empty string if that attribute isn't defined.
-
getSrcAttributeNormalized
Helper for src retrieval and normalization.- Returns:
- the value of the attribute
src
with all line breaks removed or an empty string if that attribute isn't defined.
-
getCharsetAttribute
Returns the value of the attributecharset
. Refer to the HTML 4.01 documentation for details on the use of this attribute.- Specified by:
getCharsetAttribute
in interfaceScriptElement
- Returns:
- the value of the attribute
charset
or an empty string if that attribute isn't defined.
-
getDeferAttribute
Returns the value of the attributedefer
. Refer to the HTML 4.01 documentation for details on the use of this attribute.- Returns:
- the value of the attribute
defer
or an empty string if that attribute isn't defined.
-
isDeferred
public boolean isDeferred()Returnstrue
if this script is deferred.- Specified by:
isDeferred
in interfaceScriptElement
- Returns:
true
if this script is deferred
-
onAllChildrenAddedToPage
public void onAllChildrenAddedToPage(boolean postponed) Executes theonreadystatechange
handler as well as executing the script itself, if necessary. Lifecycle method invoked after a node and all its children have been added to a page, during parsing of the HTML. Intended to be overridden by nodes which need to perform custom logic after they and all their child nodes have been processed by the HTML parser. This method is not recursive, and the default implementation is empty, so there is no need to callsuper.onAllChildrenAddedToPage()
if you implement this method.- Overrides:
onAllChildrenAddedToPage
in classDomNode
- Parameters:
postponed
- whether to usePostponedAction
or no
-
markAsCreatedByDomParser
public 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- Specified by:
markAsCreatedByDomParser
in interfaceScriptElement
-
wasCreatedByDomParser
public boolean wasCreatedByDomParser()INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Returns true if this frame was created by javascript.- Specified by:
wasCreatedByDomParser
in interfaceScriptElement
- Returns:
- true or false
-