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.ChildElementsIteratorNested classes/interfaces inherited from class org.htmlunit.html.DomNode
DomNode.ChildIterator, DomNode.DescendantElementsIterator<T extends DomNode> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate booleanstatic final StringThe 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_ATTRIBUTEFields inherited from class org.htmlunit.html.DomNode
PROPERTY_ELEMENT, READY_STATE_COMPLETE, READY_STATE_INTERACTIVE, READY_STATE_LOADED, READY_STATE_LOADING, READY_STATE_UNINITIALIZEDFields 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 StringReturns the value of the attributecharset.final StringReturns the value of the attributedefer.final StringReturns the value of the attributesrc.protected final StringHelper for src retrieval and normalization.booleanReturnstrueif this script is deferred.booleanReturns if executed.voidINTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Marks this script as created by javascript.voidonAllChildrenAddedToPage(boolean postponed) Executes theonreadystatechangehandler as well as executing the script itself, if necessary.voidsetExecuted(boolean executed) Sets if executed.booleanINTERNAL 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, writeStyleToElementMethods inherited from class org.htmlunit.html.DomNamespaceNode
getLocalName, getLowercaseName, getNamespaceURI, getPrefix, getQualifiedName, processImportNode, setPrefixMethods 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, setUserDataMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
isExecutedin interfaceScriptElement- Returns:
- if executed
-
setExecuted
public void setExecuted(boolean executed) Sets if executed.- Specified by:
setExecutedin 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:
getSrcAttributein interfaceScriptElement- Returns:
- the value of the attribute
srcor an empty string if that attribute isn't defined.
-
getSrcAttributeNormalized
Helper for src retrieval and normalization.- Returns:
- the value of the attribute
srcwith 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:
getCharsetAttributein interfaceScriptElement- Returns:
- the value of the attribute
charsetor 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
deferor an empty string if that attribute isn't defined.
-
isDeferred
public boolean isDeferred()Returnstrueif this script is deferred.- Specified by:
isDeferredin interfaceScriptElement- Returns:
trueif this script is deferred
-
onAllChildrenAddedToPage
public void onAllChildrenAddedToPage(boolean postponed) Executes theonreadystatechangehandler 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:
onAllChildrenAddedToPagein classDomNode- Parameters:
postponed- whether to usePostponedActionor 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:
markAsCreatedByDomParserin 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:
wasCreatedByDomParserin interfaceScriptElement- Returns:
- true or false
-