public class HTMLElement extends Element implements ScriptableWithFallbackGetter
HTMLElement
which is the base class for all HTML
objects. This will typically wrap an instance of HtmlElement
.Modifier and Type | Class and Description |
---|---|
static class |
HTMLElement.ProxyDomNode
ProxyDomNode.
|
Modifier and Type | Field and Description |
---|---|
static int |
BEHAVIOR_ID_CLIENT_CAPS
BEHAVIOR_ID_CLIENT_CAPS.
|
static int |
BEHAVIOR_ID_DOWNLOAD
BEHAVIOR_ID_DOWNLOAD.
|
static int |
BEHAVIOR_ID_HOMEPAGE
BEHAVIOR_ID_HOMEPAGE.
|
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 and Description |
---|
HTMLElement()
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
int |
addBehavior(String behavior)
Adds the specified behavior to this HTML element.
|
void |
addComponentRequest(String id,
String idType,
String minVersion)
Adds the specified component to the queue of components to be installed.
|
void |
blur()
Remove focus from this element.
|
void |
clearAttributes()
An IE-only method which clears all custom attributes.
|
void |
clearComponentRequest()
Clears the component install queue of all component requests.
|
void |
click()
Click this element.
|
int |
compareVersions(String v1,
String v2)
Compares the two specified version numbers.
|
Object |
createTextRange()
Creates a new TextRange object for this element.
|
boolean |
doComponentRequest()
Downloads all the components queued via
addComponentRequest(String, String, String) . |
void |
focus()
Sets the focus to this element.
|
String |
getAccessKey()
Returns the
accessKey property. |
protected String |
getAlign(boolean returnInvalidValues)
Returns the value of the
align property. |
Object |
getAttributeNode(String attributeName)
Gets the attribute node for the specified attribute.
|
Object |
getAttributeNodeNS(String namespaceURI,
String localName)
Returns the specified attribute.
|
int |
getAvailHeight()
Returns the screen's available height.
|
int |
getAvailWidth()
Returns the screen's available width.
|
ClientRect |
getBoundingClientRect()
Retrieves an object that specifies the bounds of a collection of TextRectangle objects.
|
int |
getBufferDepth()
Returns the screen's buffer depth.
|
protected String |
getCh()
Returns the value of the
ch property. |
HTMLCollection |
getChildren()
Gets the children of the current node.
|
protected String |
getChOff()
Returns the value of the
chOff property. |
DOMTokenList |
getClassList()
Gets the token list of class attribute.
|
Object |
getClassName_js()
Returns the class defined for this element.
|
int |
getClientHeight()
Returns the
clientHeight attribute. |
int |
getClientLeft()
Returns the
clientLeft attribute. |
Object |
getClientRects()
Retrieves a collection of rectangles that describes the layout of the contents of an object
or range within the client.
|
int |
getClientTop()
Returns
clientTop attribute. |
int |
getClientWidth()
Returns the
clientWidth attribute. |
int |
getColorDepth()
Returns the screen's color depth.
|
String |
getComponentVersion(String id,
String idType)
Returns the version of the specified component.
|
String |
getConnectionType()
Returns the connection type being used.
|
String |
getContentEditable()
Returns the
contentEditable property. |
boolean |
getCookieEnabled()
Returns
true if cookies are enabled. |
String |
getCpuClass()
Returns the type of CPU used.
|
DOMStringMap |
getDataset()
Returns the
dataset attribute. |
String |
getDefaultStyleDisplay()
Returns the default display style.
|
String |
getDir()
Returns the
dir property. |
boolean |
getDisabled()
Returns true if this element is disabled.
|
HtmlElement |
getDomNodeOrDie()
Returns the DOM node that corresponds to this JavaScript object or throw
an exception if one cannot be found.
|
HtmlElement |
getDomNodeOrNull()
Returns the DOM node that corresponds to this JavaScript object
or null if a node hasn't been set.
|
HTMLCollection |
getElementsByClassName(String className)
Returns all the descendant elements with the specified class.
|
int |
getHeight()
Returns the screen's height.
|
String |
getId()
Returns the element ID.
|
String |
getInnerHTML()
Gets the innerHTML attribute.
|
String |
getInnerText()
Gets the innerText attribute.
|
boolean |
getIsContentEditable()
Returns the
isContentEditable property. |
boolean |
getJavaEnabled()
Returns
true if Java is enabled. |
String |
getLang()
Returns the
lang property. |
String |
getLanguage()
Returns the
language property. |
String |
getLocalName()
Returns the local name of this element.
|
String |
getNodeName()
Gets the JavaScript property
nodeName for the current node. |
int |
getOffsetHeight()
Returns this element's offsetHeight, which is the element height plus the element's padding
plus the element's border.
|
int |
getOffsetLeft()
Returns this element's offsetLeft, which is the calculated left position of this
element relative to the offsetParent.
|
Object |
getOffsetParent_js()
Returns this element's offsetParent.
|
int |
getOffsetTop()
Returns this element's
offsetTop , which is the calculated top position of this
element relative to the offsetParent . |
int |
getOffsetWidth()
Returns this element's offsetWidth, which is the element width plus the element's padding
plus the element's border.
|
net.sourceforge.htmlunit.corejs.javascript.Function |
getOnchange()
Returns the
onchange event handler for this element. |
Object |
getOnsubmit()
Returns the
onsubmit event handler for this element. |
String |
getOuterHTML()
Gets the outerHTML of the node.
|
Element |
getParentElement()
Gets the first ancestor instance of
Element . |
HTMLElement |
getParentHTMLElement()
Gets the first ancestor instance of
HTMLElement . |
String |
getPlatform()
Returns the platform used.
|
int |
getPosX()
Returns this element's X position.
|
int |
getPosY()
Returns this element's Y position.
|
String |
getPrefix()
Returns the namespace prefix.
|
int |
getScrollHeight()
Gets the scrollHeight for this element.
|
int |
getScrollLeft()
Gets the scrollLeft value for this element.
|
int |
getScrollTop()
Gets the scrollTop value for this element.
|
int |
getScrollWidth()
Gets the scrollWidth for this element.
|
boolean |
getSpellcheck()
Returns the
spellcheck property. |
String |
getSystemLanguage()
Returns the system language.
|
int |
getTabIndex()
Returns the value of the tabIndex attribute.
|
String |
getTitle()
Returns the element title.
|
String |
getUniqueID()
Retrieves an auto-generated, unique identifier for the object.
|
String |
getUserLanguage()
Returns the user language.
|
protected String |
getVAlign(String[] valid,
String defaultValue)
Returns the value of the
vAlign property. |
int |
getWidth()
Returns the screen's width.
|
protected String |
getWidthOrHeight(String attributeName,
Boolean returnNegativeValues)
Returns the value of the specified attribute (width or height).
|
Object |
getWithFallback(String name)
Looks at attributes with the given name.
|
boolean |
hasAttribute(String name)
Returns true when an attribute with a given name is specified on this element or has a default value.
|
Object |
insertAdjacentElement(String where,
Object insertedElement)
Inserts the given element into the element at the location.
|
void |
insertAdjacentHTML(String position,
String text)
Parses the given text as HTML or XML and inserts the resulting nodes into the tree in the position given by the
position argument.
|
void |
insertAdjacentText(String where,
String text)
Inserts the given text into the element at the specified location.
|
protected boolean |
isAncestorOfEventTarget(MouseEvent event)
Returns
true if this element's node is an ancestor of the specified event's target node. |
boolean |
isComponentInstalled(String id,
String idType,
String minVersion)
Returns
true if the specified component is installed. |
protected boolean |
isDisplayNone()
Returns whether the
display is none or not. |
protected boolean |
isEndTagForbidden()
Returns whether the end tag is forbidden or not.
|
boolean |
isHomePage(String url)
Returns
true if the specified URL is the web client's current
homepage and the document calling the method is on the same domain as the
user's homepage. |
protected boolean |
isLowerCaseInOuterHtml()
Returns whether the tag is lower case in .outerHTML/.innerHTML.
|
void |
mergeAttributes(HTMLElement source,
Object preserveIdentity)
An IE-only method which copies all custom attributes from the specified source element
to this element.
|
void |
navigateHomePage()
Causes the web client to navigate to the current home page.
|
protected AttributesImpl |
readAttributes(HtmlElement element)
Gets the attributes of the element in the form of a
Attributes . |
boolean |
releaseCapture()
Mock for the moment.
|
void |
removeAttributeNode(Attr attribute)
Removes the specified attribute.
|
void |
removeBehavior(int id)
Removes the behavior corresponding to the specified identifier from this element.
|
HTMLElement |
removeNode(boolean removeChildren)
Removes this object from the document hierarchy.
|
void |
scrollIntoView()
Implement the scrollIntoView() JavaScript function but don't actually do
anything.
|
void |
setAccessKey(String accessKey)
Sets the
accessKey property. |
void |
setActive()
Sets the object as active without setting focus to the object.
|
protected void |
setAlign(String align,
boolean ignoreIfNoError)
Sets the value of the
align property. |
void |
setAttribute(String name,
String value)
Sets an attribute.
|
void |
setCapture(boolean retargetToElement)
Mock for the moment.
|
protected void |
setCh(String ch)
Sets the value of the
ch property. |
protected void |
setChOff(String chOff)
Sets the value of the
chOff property. |
void |
setClassName_js(String className)
Sets the class attribute for this element.
|
protected void |
setColorAttribute(String name,
String value)
Sets the specified color attribute to the specified value.
|
void |
setContentEditable(String contentEditable)
Sets the
contentEditable property. |
void |
setDir(String dir)
Sets the
dir property. |
void |
setDisabled(boolean disabled)
Sets whether or not to disable this element.
|
void |
setDomNode(DomNode domNode)
Sets the DOM node that corresponds to this JavaScript object.
|
void |
setHomePage(String url)
Sets the web client's current homepage.
|
void |
setId(String newId)
Sets the identifier this element.
|
void |
setInnerHTML(Object value)
Replaces all child elements of this element with the supplied value.
|
void |
setInnerText(Object value)
Replaces all child elements of this element with the supplied text value.
|
protected void |
setInnerTextImpl(String value)
The worker for setInnerText.
|
void |
setLang(String lang)
Sets the
lang property. |
void |
setLanguage(String language)
Sets the
language property. |
void |
setOnchange(Object onchange)
Sets the
onchange event handler for this element. |
void |
setOnsubmit(Object onsubmit)
Sets the
onsubmit event handler for this element. |
void |
setOuterHTML(Object value)
Replaces this element (including all child elements) with the supplied value.
|
void |
setScrollLeft(int scroll)
Sets the scrollLeft value for this element.
|
void |
setScrollTop(int scroll)
Sets the scrollTop value for this element.
|
void |
setSpellcheck(boolean spellcheck)
Sets the
spellcheck property. |
void |
setTabIndex(int tabIndex)
Sets the
tabIndex property. |
void |
setTagUrn(String tagUrn)
Sets the Uniform Resource Name (URN) specified in the namespace declaration.
|
void |
setTextContent(Object value)
Replaces all child elements of this element with the supplied text value.
|
void |
setTitle(String newTitle)
Sets the title of this element.
|
protected void |
setVAlign(Object vAlign,
String[] valid)
Sets the value of the
vAlign property. |
protected void |
setWidthOrHeight(String attributeName,
String value,
boolean allowNegativeValues)
Sets the value of the specified attribute (width or height).
|
void |
startDownload(String uri,
net.sourceforge.htmlunit.corejs.javascript.Function callback)
Implementation of the IE behavior #default#download.
|
String |
toString() |
createAttributesObject, createEventHandler, get, getAttribute, getAttributeNS, getAttributes, getBaseURI, getChildElementCount, getCurrentStyle, getElementsByTagName, getElementsByTagNameNS, getFirstElementChild, getLastElementChild, getNextElementSibling, getPreviousElementSibling, getRuntimeStyle, getStyle, getTagName, hasAttributeNS, querySelector, querySelectorAll, removeAttribute, removeAttributeNS, setAttributeNode, setAttributeNS, setDefaults, setStyle
fireEvent, getOnblur, getOnclick, getOncontextmenu, getOndblclick, getOnerror, getOnfocus, getOnfocusin, getOnfocusout, getOninput, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnpropertychange, getOnresize, setOnblur, setOnclick, setOncontextmenu, setOndblclick, setOnerror, setOnfocus, setOnfocusin, setOnfocusout, setOninput, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnpropertychange, setOnresize
appendChild, asJavaScriptException, cloneNode, compareDocumentPosition, contains, detachEvent, getChildNodes, getFirstChild, getJavaScriptNode, getLastChild, getNamespaceURI, getNextSibling, getNodeType, getNodeValue, getOwnerDocument, getParent, getParentNode, getPreviousSibling, getTextContent, hasChildNodes, insertBefore, insertBeforeImpl, isSameNode, normalize, remove, removeChild, replaceChild, setNodeValue
addEventListener, clearEventListenersContainer, dispatchEvent, executeEventLocally, fireEvent, getEventHandler, getEventHandlerProp, getEventListenersContainer, hasEventHandlers, removeEventListener, setEventHandler, setEventHandlerProp
clone, equivalentValues, getBrowserVersion, getDefaultValue, getPrototype, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, has, hasInstance, initParentScope, isReadOnlySettable, makeScriptableFor, setCaseSensitive, setDomNode, setHtmlElement
defineFunctionProperties, defineProperty, getClassName, setClassName, setParentScope
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setPrototype, size
public static final int BEHAVIOR_ID_CLIENT_CAPS
public static final int BEHAVIOR_ID_HOMEPAGE
public static final int BEHAVIOR_ID_DOWNLOAD
public void setDomNode(DomNode domNode)
setDomNode
in class Element
domNode
- the DOM nodepublic String getId()
public void setId(String newId)
newId
- the new identifier of this elementpublic String getTitle()
public void setTitle(String newTitle)
newTitle
- the new identifier of this elementpublic boolean getDisabled()
public void setDisabled(boolean disabled)
disabled
- True if this is to be disabledpublic String getLocalName()
getLocalName
in class Node
public Object getWithFallback(String name)
Scriptable
object.getWithFallback
in interface ScriptableWithFallbackGetter
name
- the name of the requested propertyScriptable.NOT_FOUND
if nothing is foundpublic void clearAttributes()
public void mergeAttributes(HTMLElement source, Object preserveIdentity)
source
- the source element from which to copy the custom attributespreserveIdentity
- if false
, the name and id attributes are not copiedpublic Object getAttributeNodeNS(String namespaceURI, String localName)
namespaceURI
- the namespace URIlocalName
- the local name of the attribute to look fornull
if the attribute is not definedpublic void setAttribute(String name, String value)
setAttribute
in class Element
name
- Name of the attribute to setvalue
- Value to set the attribute topublic void removeAttributeNode(Attr attribute)
attribute
- the attribute to removeprotected AttributesImpl readAttributes(HtmlElement element)
Attributes
.element
- the element to read the attributes frompublic HTMLElement removeNode(boolean removeChildren)
removeChildren
- whether to remove children or nopublic Object getAttributeNode(String attributeName)
getAttributeNode
in class Element
attributeName
- the name of the attribute to retrievepublic HTMLCollection getElementsByClassName(String className)
className
- the name to search forpublic Object getClassName_js()
public int getClientHeight()
clientHeight
attribute.clientHeight
attributepublic int getClientWidth()
clientWidth
attribute.clientWidth
attributepublic void setClassName_js(String className)
className
- the new class namepublic String getInnerHTML()
public String getInnerText()
public String getOuterHTML()
public void setInnerHTML(Object value)
value
- the new value for the contents of this elementpublic void setInnerText(Object value)
value
- the new value for the contents of this elementprotected void setInnerTextImpl(String value)
value
- the new value for the contents of this nodepublic void setTextContent(Object value)
setTextContent
in class Node
value
- the new value for the contents of this elementpublic void setOuterHTML(Object value)
value
- the new value for replacing this elementpublic void insertAdjacentHTML(String position, String text)
position
- specifies where to insert the nodes, using one of the following values (case-insensitive):
beforebegin
, afterbegin
, beforeend
, afterend
text
- the text to parsepublic Object insertAdjacentElement(String where, Object insertedElement)
where
- specifies where to insert the element, using one of the following values (case-insensitive):
beforebegin, afterbegin, beforeend, afterendinsertedElement
- the element to be insertedpublic void insertAdjacentText(String where, String text)
where
- specifies where to insert the text, using one of the following values (case-insensitive):
beforebegin, afterbegin, beforeend, afterendtext
- the text to insertpublic int addBehavior(String behavior)
behavior
- the URL of the behavior to add, or a default behavior namepublic void removeBehavior(int id)
id
- the identifier for the behavior to removepublic int getAvailHeight()
public int getAvailWidth()
public int getBufferDepth()
public int getColorDepth()
public String getConnectionType()
public boolean getCookieEnabled()
true
if cookies are enabled. Part of the #default#clientCaps
default IE behavior implementation.public String getCpuClass()
public int getHeight()
public boolean getJavaEnabled()
true
if Java is enabled. Part of the #default#clientCaps
default IE behavior implementation.public String getPlatform()
public String getSystemLanguage()
public String getUserLanguage()
public int getWidth()
public void addComponentRequest(String id, String idType, String minVersion)
id
- the identifier for the component to installidType
- the type of identifier specifiedminVersion
- the minimum version of the component to installpublic void clearComponentRequest()
public int compareVersions(String v1, String v2)
v1
- the first of the two version numbers to comparev2
- the second of the two version numbers to comparepublic boolean doComponentRequest()
addComponentRequest(String, String, String)
.true
if the components are downloaded successfully
Current implementation always return false
public String getComponentVersion(String id, String idType)
id
- the identifier for the component whose version is to be returnedidType
- the type of identifier specifiedpublic boolean isComponentInstalled(String id, String idType, String minVersion)
true
if the specified component is installed.id
- the identifier for the component to check foridType
- the type of id specifiedminVersion
- the minimum version to check fortrue
if the specified component is installedpublic void startDownload(String uri, net.sourceforge.htmlunit.corejs.javascript.Function callback) throws MalformedURLException
uri
- the URI of the download sourcecallback
- the method which should be called when the download is finishedMalformedURLException
- if the URL cannot be createdpublic boolean isHomePage(String url)
true
if the specified URL is the web client's current
homepage and the document calling the method is on the same domain as the
user's homepage. Part of the #default#homePage default IE behavior
implementation.url
- the URL to checktrue
if the specified URL is the current homepagepublic void setHomePage(String url)
url
- the new homepage URLpublic void navigateHomePage() throws IOException
IOException
- if loading home page failspublic int getOffsetHeight()
protected final boolean isDisplayNone()
display
is none
or not.display
is none
or notpublic int getOffsetWidth()
protected boolean isAncestorOfEventTarget(MouseEvent event)
true
if this element's node is an ancestor of the specified event's target node.event
- the event whose target node is to be checkedtrue
if this element's node is an ancestor of the specified event's target nodepublic int getScrollTop()
public void setScrollTop(int scroll)
scroll
- the scrollTop value for this elementpublic int getScrollLeft()
public void setScrollLeft(int scroll)
scroll
- the scrollLeft value for this elementpublic int getScrollHeight()
public int getScrollWidth()
public void setTagUrn(String tagUrn)
tagUrn
- the Uniform Resource Name (URN) specified in the namespace declarationpublic HTMLElement getParentHTMLElement()
HTMLElement
. It is mostly identical
to Node.getParent()
except that it skips XML nodes.Node.getParent()
public void scrollIntoView()
public Object getClientRects()
public String getUniqueID()
public HtmlElement getDomNodeOrDie()
getDomNodeOrDie
in class Element
public HtmlElement getDomNodeOrNull()
getDomNodeOrNull
in class SimpleScriptable
public Object createTextRange()
public void focus()
public void setActive()
public String getNodeName()
nodeName
for the current node.getNodeName
in class Node
public String getPrefix()
public void click() throws IOException
IOException
- if this click triggers a page load that encounters problemspublic boolean getSpellcheck()
spellcheck
property.spellcheck
propertypublic void setSpellcheck(boolean spellcheck)
spellcheck
property.spellcheck
- the spellcheck
propertypublic String getLang()
lang
property.lang
propertypublic void setLang(String lang)
lang
property.lang
- the lang
propertypublic String getLanguage()
language
property.language
propertypublic void setLanguage(String language)
language
property.language
- the language
propertypublic String getDir()
dir
property.dir
propertypublic void setDir(String dir)
dir
property.dir
- the dir
propertypublic int getTabIndex()
public void setTabIndex(int tabIndex)
tabIndex
property.tabIndex
- the tabIndex
propertypublic String getAccessKey()
accessKey
property.accessKey
propertypublic void setAccessKey(String accessKey)
accessKey
property.accessKey
- the accessKey
propertyprotected String getWidthOrHeight(String attributeName, Boolean returnNegativeValues)
attributeName
- the name of the attribute to return ("width" or "height")returnNegativeValues
- if true
, negative values are returned;
if false
, this method returns an empty string in lieu of negative values;
if null
, this method returns 0 in lieu of negative valuesprotected void setWidthOrHeight(String attributeName, String value, boolean allowNegativeValues)
attributeName
- the name of the attribute to set ("width" or "height")value
- the value of the specified attribute (width or height)allowNegativeValues
- if true
, negative values will be stored;
if false
, negative values cause an exception to be thrown;protected void setColorAttribute(String name, String value)
name
- the color attribute's namevalue
- the color attribute's valueprotected String getAlign(boolean returnInvalidValues)
align
property.returnInvalidValues
- if true
, this method will return any value, including technically
invalid values; if false
, this method will return an empty string instead of invalid valuesalign
propertyprotected void setAlign(String align, boolean ignoreIfNoError)
align
property.align
- the value of the align
propertyignoreIfNoError
- if true
, the invocation will be a no-op if it does not trigger an error
(i.e., it will not actually set the align attribute)protected String getVAlign(String[] valid, String defaultValue)
vAlign
property.valid
- the valid values; if null
, any value is validdefaultValue
- the default value to use, if necessaryvAlign
propertyprotected void setVAlign(Object vAlign, String[] valid)
vAlign
property.vAlign
- the value of the vAlign
propertyvalid
- the valid values; if null
, any value is validprotected String getCh()
ch
property.ch
propertyprotected void setCh(String ch)
ch
property.ch
- the value of the ch
propertyprotected String getChOff()
chOff
property.chOff
propertyprotected void setChOff(String chOff)
chOff
property.chOff
- the value of the chOff
propertypublic int getOffsetLeft()
public int getPosX()
public int getPosY()
public int getClientLeft()
clientLeft
attribute.clientLeft
attributepublic int getClientTop()
clientTop
attribute.clientTop
attributepublic int getOffsetTop()
offsetTop
, which is the calculated top position of this
element relative to the offsetParent
.offsetTop
public Object getOffsetParent_js()
undefined
when this node is
not attached or null
for body
.public ClientRect getBoundingClientRect()
getBoundingClientRect
in class Element
public DOMTokenList getClassList()
getClassList
in class Element
public boolean hasAttribute(String name)
hasAttribute
in class Element
name
- the name of the attribute to look forpublic HTMLCollection getChildren()
getChildren
in class Element
public Element getParentElement()
Element
. It is mostly identical
to Node.getParent()
except that it skips non Element
nodes. Overridden to modify browser configurations.getParentElement
in class Element
Node.getParent()
public DOMStringMap getDataset()
dataset
attribute.dataset
attributeprotected boolean isEndTagForbidden()
protected boolean isLowerCaseInOuterHtml()
public void setOnchange(Object onchange)
onchange
event handler for this element.onchange
- the onchange
event handler for this elementpublic net.sourceforge.htmlunit.corejs.javascript.Function getOnchange()
onchange
event handler for this element.onchange
event handler for this elementpublic Object getOnsubmit()
onsubmit
event handler for this element.onsubmit
event handler for this elementpublic void setOnsubmit(Object onsubmit)
onsubmit
event handler for this element.onsubmit
- the onsubmit
event handler for this elementpublic final String getDefaultStyleDisplay()
public void setCapture(boolean retargetToElement)
retargetToElement
- if true, all events are targeted directly to this element;
if false, events can also fire at descendants of this elementpublic boolean releaseCapture()
public String getContentEditable()
contentEditable
property.contentEditable
propertypublic void setContentEditable(String contentEditable)
contentEditable
property.contentEditable
- the contentEditable
property to setpublic boolean getIsContentEditable()
isContentEditable
property.isContentEditable
propertyCopyright © 2002–2017 Gargoyle Software Inc.. All rights reserved.