Package org.lobobrowser.html.domimpl
Class ElementImpl
java.lang.Object
org.lobobrowser.js.AbstractScriptableDelegate
org.lobobrowser.html.domimpl.NodeImpl
org.lobobrowser.html.domimpl.ElementImpl
- All Implemented Interfaces:
ModelNode
,ScriptableDelegate
,Element
,Node
- Direct Known Subclasses:
HTMLElementImpl
-
Field Summary
FieldsFields inherited from class org.lobobrowser.html.domimpl.NodeImpl
document, logger, nodeList, notificationsSuspended, parentNode, treeLock, uiNode
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 TypeMethodDescriptionprotected void
assignAttributeField
(String normalName, String value) protected Node
Should create a node with some cloned properties, like the node name, but not attributes or children.boolean
equalAttributes
(Node arg) final String
getAttribute
(String name) getAttributeNode
(String name) getAttributeNodeNS
(String namespaceURI, String localName) getAttributeNS
(String namespaceURI, String localName) getDir()
getElementsByTagName
(String name) getElementsByTagNameNS
(String namespaceURI, String localName) getId()
getLang()
short
protected String
getRawInnerText
(boolean includeComment) Gets inner text of the element, possibly including text in comments.getTitle()
boolean
hasAttribute
(String name) boolean
hasAttributeNS
(String namespaceURI, String localName) boolean
protected String
htmlEncodeChildText
(String text) protected static boolean
protected final String
normalizeAttributeName
(String name) void
removeAttribute
(String name) removeAttributeNode
(Attr oldAttr) void
removeAttributeNS
(String namespaceURI, String localName) void
setAttribute
(String name, String value) void
setAttributeImpl
(String name, String value) Fast method to set attributes.setAttributeNode
(Attr newAttr) setAttributeNodeNS
(Attr newAttr) void
setAttributeNS
(String namespaceURI, String qualifiedName, String value) void
void
void
setIdAttribute
(String name, boolean isId) void
setIdAttributeNode
(Attr idAttr, boolean isId) void
setIdAttributeNS
(String namespaceURI, String localName, boolean isId) void
setInnerText
(String newText) void
void
setNodeValue
(String nodeValue) void
toString()
Methods inherited from class org.lobobrowser.html.domimpl.NodeImpl
appendChild, appendInnerHTMLImpl, appendInnerTextImpl, cloneNode, compareDocumentPosition, createRenderState, findUINode, forgetRenderState, getAlignmentX, getAlignmentY, getBaseURI, getChildNodes, getChildren, getChildrenArray, getDescendents, getDocumentItem, getDocumentURL, getFeature, getFirstChild, getFullURL, getHtmlRendererContext, getInnerHTML, getInnerText, getLastChild, getNamespaceURI, getNextSibling, getNodeList, getOwnerDocument, getParentModelNode, getParentNode, getParentRenderState, getPrefix, getPreviousSibling, getRenderState, getTextContent, getUINode, getUserAgentContext, getUserData, hasChildNodes, informDocumentInvalid, informExternalScriptLoading, informInvalid, informLayoutInvalid, informLookInvalid, informNodeLoaded, informPositionInvalid, informSizeInvalid, informStructureInvalid, insertAfter, insertAt, insertBefore, isDefaultNamespace, isEqualNode, isEqualOrDescendentOf, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeAllChildren, removeAllChildrenImpl, removeChild, removeChildAt, removeChildren, removeChildrenImpl, replaceAdjacentTextNodes, replaceAdjacentTextNodes, replaceChild, setDocumentItem, setPrefix, setTextContent, setUINode, setUserData, warn, warn
Methods inherited from class org.lobobrowser.js.AbstractScriptableDelegate
getScriptable, setScriptable
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, cloneNode, compareDocumentPosition, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getNamespaceURI, getNextSibling, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setPrefix, setTextContent, setUserData
-
Field Details
-
attributes
-
-
Constructor Details
-
ElementImpl
-
-
Method Details
-
getAttributes
- Specified by:
getAttributes
in interfaceNode
- Overrides:
getAttributes
in classNodeImpl
-
hasAttributes
public boolean hasAttributes()- Specified by:
hasAttributes
in interfaceNode
- Overrides:
hasAttributes
in classNodeImpl
-
equalAttributes
- Overrides:
equalAttributes
in classNodeImpl
-
getId
-
setId
-
getTitle
-
setTitle
-
getLang
-
setLang
-
getDir
-
setDir
-
getAttribute
- Specified by:
getAttribute
in interfaceElement
-
getAttributeNode
- Specified by:
getAttributeNode
in interfaceElement
-
getAttributeNodeNS
- Specified by:
getAttributeNodeNS
in interfaceElement
- Throws:
DOMException
-
getAttributeNS
- Specified by:
getAttributeNS
in interfaceElement
- Throws:
DOMException
-
isTagName
-
getElementsByTagName
- Specified by:
getElementsByTagName
in interfaceElement
-
getElementsByTagNameNS
- Specified by:
getElementsByTagNameNS
in interfaceElement
- Throws:
DOMException
-
getSchemaTypeInfo
- Specified by:
getSchemaTypeInfo
in interfaceElement
-
getTagName
- Specified by:
getTagName
in interfaceElement
-
hasAttribute
- Specified by:
hasAttribute
in interfaceElement
-
hasAttributeNS
- Specified by:
hasAttributeNS
in interfaceElement
- Throws:
DOMException
-
removeAttribute
- Specified by:
removeAttribute
in interfaceElement
- Throws:
DOMException
-
removeAttributeNode
- Specified by:
removeAttributeNode
in interfaceElement
- Throws:
DOMException
-
removeAttributeNS
- Specified by:
removeAttributeNS
in interfaceElement
- Throws:
DOMException
-
assignAttributeField
-
normalizeAttributeName
-
setAttribute
- Specified by:
setAttribute
in interfaceElement
- Throws:
DOMException
-
setAttributeImpl
Fast method to set attributes. It is not thread safe. Calling thread should hold a treeLock.- Throws:
DOMException
-
setAttributeNode
- Specified by:
setAttributeNode
in interfaceElement
- Throws:
DOMException
-
setAttributeNodeNS
- Specified by:
setAttributeNodeNS
in interfaceElement
- Throws:
DOMException
-
setAttributeNS
public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException - Specified by:
setAttributeNS
in interfaceElement
- Throws:
DOMException
-
setIdAttribute
- Specified by:
setIdAttribute
in interfaceElement
- Throws:
DOMException
-
setIdAttributeNode
- Specified by:
setIdAttributeNode
in interfaceElement
- Throws:
DOMException
-
setIdAttributeNS
public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException - Specified by:
setIdAttributeNS
in interfaceElement
- Throws:
DOMException
-
getLocalName
- Specified by:
getLocalName
in interfaceNode
- Specified by:
getLocalName
in classNodeImpl
-
getNodeName
- Specified by:
getNodeName
in interfaceNode
- Specified by:
getNodeName
in classNodeImpl
-
getNodeType
public short getNodeType()- Specified by:
getNodeType
in interfaceNode
- Specified by:
getNodeType
in classNodeImpl
-
getNodeValue
- Specified by:
getNodeValue
in interfaceNode
- Specified by:
getNodeValue
in classNodeImpl
- Throws:
DOMException
-
setNodeValue
- Specified by:
setNodeValue
in interfaceNode
- Specified by:
setNodeValue
in classNodeImpl
- Throws:
DOMException
-
getRawInnerText
Gets inner text of the element, possibly including text in comments. This can be used to get Javascript code out of a SCRIPT element.- Parameters:
includeComment
-
-
toString
-
setInnerText
-
createSimilarNode
Description copied from class:NodeImpl
Should create a node with some cloned properties, like the node name, but not attributes or children.- Specified by:
createSimilarNode
in classNodeImpl
-
htmlEncodeChildText
- Overrides:
htmlEncodeChildText
in classNodeImpl
-