com.gargoylesoftware.htmlunit.javascript.host
Class HTMLElement

java.lang.Object
  extended by org.mozilla.javascript.ScriptableObject
      extended by com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
          extended by com.gargoylesoftware.htmlunit.javascript.host.NodeImpl
              extended by com.gargoylesoftware.htmlunit.javascript.host.HTMLElement
All Implemented Interfaces:
ScriptableWithFallbackGetter, java.io.Serializable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable
Direct Known Subclasses:
FocusableHostElement, FrameSet, HTMLFormElement, HTMLFrameElement, Image, Option, RowContainer, Script, TableCell, TableRow

public class HTMLElement
extends NodeImpl
implements ScriptableWithFallbackGetter

The javascript object "HTMLElement" which is the base class for all HTML objects. This will typically wrap an instance of HtmlElement.

Version:
$Revision: 1.3 $
Author:
Mike Bowler, David K. Taylor, Barnaby Court, Christian Sell, Chris Erskine, David D. Kilzer, Daniel Gredler, Marc Guillemot, Hans Donner, Bruce Faulkner, Ahmed Ashour
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mozilla.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
 
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
HTMLElement()
 Create an instance.
 
Method Summary
 void addComponentRequest(java.lang.String id, java.lang.String idType, java.lang.String minVersion)
 Adds the specified component to the queue of components to be installed.
 void clearComponentRequest()
 Clears the component install queue of all component requests.
 int compareVersions(java.lang.String v1, java.lang.String v2)
 Compares the two specified version numbers.
 boolean doComponentRequest()
 Downloads all the components queued via addComponentRequest(String, String, String).
 int getAvailHeight()
 Returns the screen's available height.
 int getAvailWidth()
 Returns the screen's available width.
 int getBufferDepth()
 Returns the screen's buffer depth.
 int getColorDepth()
 Returns the screen's color depth.
 java.lang.String getComponentVersion(java.lang.String id, java.lang.String idType)
 Returns the version of the specified component.
 java.lang.String getConnectionType()
 Returns the connection type being used.
 boolean getCookieEnabled()
 Returns true if cookies are enabled.
 java.lang.String getCpuClass()
 Returns the type of CPU used.
 int getHeight()
 Returns the screen's height.
 boolean getJavaEnabled()
 Returns true if Java is enabled.
 java.lang.String getPlatform()
 Returns the platform used.
 java.lang.String getSystemLanguage()
 Returns the system language.
 java.lang.String getUserLanguage()
 Returns the user language.
 int getWidth()
 Returns the screen's width.
 java.lang.Object getWithFallback(java.lang.String name)
 Looks at attributes with the given name Fallback called when no configured property is found with the given name on the Scriptable object.
 boolean isComponentInstalled(java.lang.String id, java.lang.String idType, java.lang.String minVersion)
 Returns true if the specified component is installed.
 boolean isHomePage(java.lang.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.
 int jsxFunction_addBehavior(java.lang.String behavior)
 Adds the specified behavior to this HTML element.
 java.lang.String jsxFunction_getAttribute(java.lang.String attributeName)
 Gets the specified property.
 java.lang.Object jsxFunction_getAttributeNode(java.lang.String attributeName)
 Gets the attribute node for the specified attribute.
 TextRectangle jsxFunction_getBoundingClientRect()
 Retrieves an object that specifies the bounds of a collection of TextRectangle objects.
 java.lang.Object jsxFunction_getClientRects()
 Retrieves a collection of rectangles that describes the layout of the contents of an object or range within the client.
 java.lang.Object jsxFunction_getElementsByTagName(java.lang.String tagName)
 Returns all the descendant elements with the specified tag name.
 java.lang.Object jsxFunction_insertAdjacentElement(java.lang.String where, java.lang.Object object)
 Inserts the given element into the element at the location.
 void jsxFunction_insertAdjacentHTML(java.lang.String where, java.lang.String text)
 Inserts the given HTML text into the element at the location.
 void jsxFunction_removeAttribute(java.lang.String name)
 Remove an attribute.
 void jsxFunction_removeBehavior(int id)
 Removes the behavior corresponding to the specified identifier from this element.
 void jsxFunction_scrollIntoView()
 Implement the scrollIntoView() javascript function but don't actually do anything.
 void jsxFunction_setAttribute(java.lang.String name, java.lang.String value)
 Set an attribute.
 Attribute jsxFunction_setAttributeNode(Attribute newAtt)
 Sets the attribute node for the specified attribute.
 HTMLCollection jsxGet_all()
 Return the value of the "all" property.
 java.lang.Object jsxGet_children()
 Get the children of the current node.
 java.lang.Object jsxGet_className()
 Return the class defined for this element
 java.lang.Object jsxGet_currentStyle()
 Returns the current style object for this element.
 boolean jsxGet_disabled()
 Return true if this element is disabled.
 java.lang.String jsxGet_id()
 Return the element ID.
 java.lang.String jsxGet_innerHTML()
 Get the innerHTML attribute
 java.lang.String jsxGet_innerText()
 Get the innerText attribute
 java.lang.String jsxGet_localName()
 Returns The local name (without prefix).
 java.lang.String jsxGet_namespaceURI()
 Returns The URI that identifies an XML namespace.
 int jsxGet_offsetHeight()
 Get the offsetHeight for this element.
 int jsxGet_offsetLeft()
 Get the offsetLeft for this element.
 java.lang.Object jsxGet_offsetParent()
 Get the offsetParent for this element
 int jsxGet_offsetTop()
 Get the offsetTop for this element.
 int jsxGet_offsetWidth()
 Get the offsetWidth for this element.
 java.lang.Object jsxGet_onblur()
 Get the onblur event handler for this element.
 java.lang.Object jsxGet_onclick()
 Get the onclick event handler for this element.
 java.lang.Object jsxGet_oncontextmenu()
 Get the oncontextmenu event handler for this element.
 java.lang.Object jsxGet_ondblclick()
 Get the ondblclick event handler for this element.
 java.lang.Object jsxGet_onfocus()
 Get the onfocus event handler for this element.
 java.lang.Object jsxGet_onkeydown()
 Get the onkeydown event handler for this element.
 java.lang.Object jsxGet_onkeypress()
 Get the onkeypress event handler for this element.
 java.lang.Object jsxGet_onkeyup()
 Get the onkeyup event handler for this element.
 java.lang.Object jsxGet_onmousedown()
 Get the onmousedown event handler for this element.
 java.lang.Object jsxGet_onmousemove()
 Get the onmousemove event handler for this element.
 java.lang.Object jsxGet_onmouseout()
 Get the onmouseout event handler for this element.
 java.lang.Object jsxGet_onmouseover()
 Get the onmouseover event handler for this element.
 java.lang.Object jsxGet_onmouseup()
 Get the onmouseup event handler for this element.
 java.lang.Object jsxGet_onresize()
 Get the onresize event handler for this element.
 java.lang.String jsxGet_outerHTML()
 Gets the outerHTML of the node.
 java.lang.Object jsxGet_ownerDocument()
 Return the owner document
 java.lang.Object jsxGet_parentElement()
 Get the JavaScript property "parentElement".
 java.lang.String jsxGet_prefix()
 Returns The Namespace prefix
 java.lang.Object jsxGet_runtimeStyle()
 Returns the runtime style object for this element.
 int jsxGet_scrollHeight()
 Get the scrollHeight for this element.
 int jsxGet_scrollLeft()
 Get the scrollLeft for this element.
 int jsxGet_scrollTop()
 Get the scrollTop for this element.
 int jsxGet_scrollWidth()
 Get the scrollWidth for this element.
 java.lang.Object jsxGet_style()
 Return the style object for this element.
 java.lang.String jsxGet_tagName()
 Return the tag name of this element.
 java.lang.String jsxGet_title()
 Return the element title.
 void jsxSet_className(java.lang.String className)
 Set the class attribute for this element.
 void jsxSet_disabled(boolean disabled)
 Set whether or not to disable this element
 void jsxSet_id(java.lang.String newId)
 Set the identifier this element.
 void jsxSet_innerHTML(java.lang.Object value)
 Replace all children elements of this element with the supplied value.
 void jsxSet_innerText(java.lang.String value)
 Replace all children elements of this element with the supplied value.
 void jsxSet_onblur(java.lang.Object handler)
 Set the onblur event handler for this element.
 void jsxSet_onclick(java.lang.Object handler)
 Set the onclick event handler for this element.
 void jsxSet_oncontextmenu(java.lang.Object handler)
 Set the oncontextmenu event handler for this element.
 void jsxSet_ondblclick(java.lang.Object handler)
 Set the ondblclick event handler for this element.
 void jsxSet_onfocus(java.lang.Object handler)
 Set the onfocus event handler for this element.
 void jsxSet_onkeydown(java.lang.Object handler)
 Set the onkeydown event handler for this element.
 void jsxSet_onkeypress(java.lang.Object handler)
 Set the onkeypress event handler for this element.
 void jsxSet_onkeyup(java.lang.Object handler)
 Set the onkeyup event handler for this element.
 void jsxSet_onmousedown(java.lang.Object handler)
 Set the onmousedown event handler for this element.
 void jsxSet_onmousemove(java.lang.Object handler)
 Set the onmousemove event handler for this element.
 void jsxSet_onmouseout(java.lang.Object handler)
 Set the onmouseout event handler for this element.
 void jsxSet_onmouseover(java.lang.Object handler)
 Set the onmouseover event handler for this element.
 void jsxSet_onmouseup(java.lang.Object handler)
 Set the onmouseup event handler for this element.
 void jsxSet_onresize(java.lang.Object handler)
 Set the onresize event handler for this element.
 void jsxSet_outerHTML(java.lang.String value)
 Replace all children elements of this element with the supplied value.
 void jsxSet_scrollLeft(int scroll)
 Set the scrollLeft for this element.
 void jsxSet_scrollTop(int scroll)
 Set the scrollTop for this element.
 void jsxSet_title(java.lang.String newTitle)
 Set the title of this element.
 void navigateHomePage()
 Causes the web client to navigate to the current home page.
 void setDomNode(DomNode domNode)
 Set the DOM node that corresponds to this javascript object
 void setHomePage(java.lang.String url)
 Sets the web client's current homepage.
 void startDownload(java.lang.String uri, org.mozilla.javascript.Function callback)
 Implementation of the IE behavior #default#download
 java.lang.String toString()
 Just for debug purposes.
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.NodeImpl
executeEvent, fireEvent, getEventHandler, jsxFunction_addEventListener, jsxFunction_appendChild, jsxFunction_attachEvent, jsxFunction_cloneNode, jsxFunction_detachEvent, jsxFunction_hasChildNodes, jsxFunction_insertBefore, jsxFunction_isSameNode, jsxFunction_removeChild, jsxFunction_removeEventListener, jsxFunction_replaceChild, jsxGet_childNodes, jsxGet_firstChild, jsxGet_lastChild, jsxGet_nextSibling, jsxGet_nodeName, jsxGet_nodeType, jsxGet_nodeValue, jsxGet_parentNode, jsxGet_previousSibling, jsxSet_nodeValue, setEventHandler
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
get, getBooleanArg, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getHtmlElementOrDie, getHtmlElementOrNull, getIntArg, getObjectArg, getStringArg, makeScriptableFor, setHtmlElement
 
Methods inherited from class org.mozilla.javascript.ScriptableObject
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, has, hasInstance, hasProperty, hasProperty, isConst, isSealed, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mozilla.javascript.Scriptable
delete, delete, get, get, getClassName, getDefaultValue, getIds, getParentScope, getPrototype, has, has, hasInstance, put, put, setParentScope, setPrototype
 

Constructor Detail

HTMLElement

public HTMLElement()
Create an instance.

Method Detail

addComponentRequest

public void addComponentRequest(java.lang.String id,
                                java.lang.String idType,
                                java.lang.String minVersion)
Adds the specified component to the queue of components to be installed. Note that no components ever get installed, and this call is always ignored. Part of the #default#clientCaps default IE behavior implementation.

Parameters:
id - the identifier for the component to install
idType - the type of identifier specified
minVersion - the minimum version of the component to install

clearComponentRequest

public void clearComponentRequest()
Clears the component install queue of all component requests. Note that no components ever get installed, and this call is always ignored. Part of the #default#clientCaps default IE behavior implementation.


compareVersions

public int compareVersions(java.lang.String v1,
                           java.lang.String v2)
Compares the two specified version numbers. Part of the #default#clientCaps default IE behavior implementation.

Parameters:
v1 - the first of the two version numbers to compare
v2 - the second of the two version numbers to compare
Returns:
-1 if v1 < v2, 0 if v1 = v2, and 1 if v1 > v2

doComponentRequest

public boolean doComponentRequest()
Downloads all the components queued via addComponentRequest(String, String, String).

Returns:
true if the components are downloaded successfully. Current implementation always return false

getAvailHeight

public int getAvailHeight()
Returns the screen's available height. Part of the #default#clientCaps default IE behavior implementation.

Returns:
the screen's available height.

getAvailWidth

public int getAvailWidth()
Returns the screen's available width. Part of the #default#clientCaps default IE behavior implementation.

Returns:
the screen's available width.

getBufferDepth

public int getBufferDepth()
Returns the screen's buffer depth. Part of the #default#clientCaps default IE behavior implementation.

Returns:
the screen's buffer depth.

getColorDepth

public int getColorDepth()
Returns the screen's color depth. Part of the #default#clientCaps default IE behavior implementation.

Returns:
the screen's color depth.

getComponentVersion

public java.lang.String getComponentVersion(java.lang.String id,
                                            java.lang.String idType)
Returns the version of the specified component.

Parameters:
id - the identifier for the component whose version is to be returned
idType - the type of identifier specified
Returns:
the version of the specified component. Current implementation always return "1.0"

getConnectionType

public java.lang.String getConnectionType()
Returns the connection type being used. Part of the #default#clientCaps default IE behavior implementation.

Returns:
the connection type being used. Current implementation always return "modem"

getCookieEnabled

public boolean getCookieEnabled()
Returns true if cookies are enabled. Part of the #default#clientCaps default IE behavior implementation.

Returns:
whether or not cookies are enabled.

getCpuClass

public java.lang.String getCpuClass()
Returns the type of CPU used. Part of the #default#clientCaps default IE behavior implementation.

Returns:
the type of CPU used.

getHeight

public int getHeight()
Returns the screen's height. Part of the #default#clientCaps default IE behavior implementation.

Returns:
the screen's height.

getJavaEnabled

public boolean getJavaEnabled()
Returns true if Java is enabled. Part of the #default#clientCaps default IE behavior implementation.

Returns:
whether or not Java is enabled.

getPlatform

public java.lang.String getPlatform()
Returns the platform used. Part of the #default#clientCaps default IE behavior implementation.

Returns:
the platform used.

getSystemLanguage

public java.lang.String getSystemLanguage()
Returns the system language. Part of the #default#clientCaps default IE behavior implementation.

Returns:
the system language.

getUserLanguage

public java.lang.String getUserLanguage()
Returns the user language. Part of the #default#clientCaps default IE behavior implementation.

Returns:
the user language.

getWidth

public int getWidth()
Returns the screen's width. Part of the #default#clientCaps default IE behavior implementation.

Returns:
the screen's width.

getWithFallback

public java.lang.Object getWithFallback(java.lang.String name)
Looks at attributes with the given name Fallback called when no configured property is found with the given name on the Scriptable object.

Specified by:
getWithFallback in interface ScriptableWithFallbackGetter
Parameters:
name - the name of the requested property
Returns:
the object value, Scriptable.NOT_FOUND if nothing is found

isComponentInstalled

public boolean isComponentInstalled(java.lang.String id,
                                    java.lang.String idType,
                                    java.lang.String minVersion)
Returns true if the specified component is installed.

Parameters:
id - the identifier for the component to check for
idType - the type of id specified
minVersion - the minimum version to check for
Returns:
true if the specified component is installed.

isHomePage

public boolean isHomePage(java.lang.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. Part of the #default#homePage default IE behavior implementation.

Parameters:
url - the URL to check
Returns:
true if the specified URL is the current homepage

jsxFunction_addBehavior

public int jsxFunction_addBehavior(java.lang.String behavior)
Adds the specified behavior to this HTML element. Currently only supports the following default IE behaviors:

Parameters:
behavior - the URL of the behavior to add, or a default behavior name
Returns:
an identifier that can be user later to detach the behavior from the element

jsxFunction_getAttribute

public java.lang.String jsxFunction_getAttribute(java.lang.String attributeName)
Gets the specified property.

Parameters:
attributeName - attribute name.
Returns:
The value of the specified attribute, null if the attribute is not defined

jsxFunction_getAttributeNode

public java.lang.Object jsxFunction_getAttributeNode(java.lang.String attributeName)
Gets the attribute node for the specified attribute.

Parameters:
attributeName - the name of the attribute to retrieve
Returns:
the attribute node for the specified attribute.

jsxFunction_getBoundingClientRect

public TextRectangle jsxFunction_getBoundingClientRect()
Retrieves an object that specifies the bounds of a collection of TextRectangle objects.

Returns:
an object that specifies the bounds of a collection of TextRectangle objects.

jsxFunction_getClientRects

public java.lang.Object jsxFunction_getClientRects()
Retrieves a collection of rectangles that describes the layout of the contents of an object or range within the client. Each rectangle describes a single line.

Returns:
a collection of rectangles that describes the layout of the contents.

jsxFunction_getElementsByTagName

public java.lang.Object jsxFunction_getElementsByTagName(java.lang.String tagName)
Returns all the descendant elements with the specified tag name.

Parameters:
tagName - the name to search for
Returns:
all the descendant elements with the specified tag name

jsxFunction_insertAdjacentElement

public java.lang.Object jsxFunction_insertAdjacentElement(java.lang.String where,
                                                          java.lang.Object object)
Inserts the given element into the element at the location.

Parameters:
where - specifies where to insert the element, using one of the following value: beforeBegin, afterBegin, beforeEnd, afterEnd
object - the element to insert
Returns:
an element object
See Also:
MSDN documentation

jsxFunction_insertAdjacentHTML

public void jsxFunction_insertAdjacentHTML(java.lang.String where,
                                           java.lang.String text)
Inserts the given HTML text into the element at the location.

Parameters:
where - specifies where to insert the HTML text, using one of the following value: beforeBegin, afterBegin, beforeEnd, afterEnd
text - the HTML text to insert
See Also:
MSDN documentation

jsxFunction_removeAttribute

public void jsxFunction_removeAttribute(java.lang.String name)
Remove an attribute.

Parameters:
name - Name of the attribute to remove

jsxFunction_removeBehavior

public void jsxFunction_removeBehavior(int id)
Removes the behavior corresponding to the specified identifier from this element.

Parameters:
id - the identifier for the behavior to remove

jsxFunction_scrollIntoView

public void jsxFunction_scrollIntoView()
Implement the scrollIntoView() javascript function but don't actually do anything. The requirement is just to prevent scripts that call that method from failing


jsxFunction_setAttribute

public void jsxFunction_setAttribute(java.lang.String name,
                                     java.lang.String value)
Set an attribute. See also the DOM reference

Parameters:
name - Name of the attribute to set
value - Value to set the attribute to

jsxFunction_setAttributeNode

public Attribute jsxFunction_setAttributeNode(Attribute newAtt)
Sets the attribute node for the specified attribute.

Parameters:
newAtt - the attribute to set.
Returns:
the replaced attribute node, if any.

jsxGet_all

public HTMLCollection jsxGet_all()
Return the value of the "all" property.

Returns:
The value of the "all" property

jsxGet_children

public java.lang.Object jsxGet_children()
Get the children of the current node.

Returns:
the child at the given position
See Also:
MSDN documentation

jsxGet_className

public java.lang.Object jsxGet_className()
Return the class defined for this element

Returns:
the class name

jsxGet_currentStyle

public java.lang.Object jsxGet_currentStyle()
Returns the current style object for this element.

Returns:
The current style object

jsxGet_disabled

public boolean jsxGet_disabled()
Return true if this element is disabled.

Returns:
True if this element is disabled.

jsxGet_id

public java.lang.String jsxGet_id()
Return the element ID.

Returns:
The ID of this element.

jsxGet_innerHTML

public java.lang.String jsxGet_innerHTML()
Get the innerHTML attribute

Returns:
the contents of this node as html

jsxGet_innerText

public java.lang.String jsxGet_innerText()
Get the innerText attribute

Returns:
the contents of this node as text

jsxGet_localName

public java.lang.String jsxGet_localName()
Returns The local name (without prefix).

Returns:
The local name (without prefix).

jsxGet_namespaceURI

public java.lang.String jsxGet_namespaceURI()
Returns The URI that identifies an XML namespace.

Returns:
The URI that identifies an XML namespace.

jsxGet_offsetHeight

public int jsxGet_offsetHeight()
Get the offsetHeight for this element.

Returns:
a dummy value compatible with mouse events coordinates
See Also:
MSDN documentation

jsxGet_offsetLeft

public int jsxGet_offsetLeft()
Get the offsetLeft for this element.

Returns:
a dummy value
See Also:
MSDN documentation

jsxGet_offsetParent

public java.lang.Object jsxGet_offsetParent()
Get the offsetParent for this element

Returns:
the offsetParent for this element
See Also:
MSDN documentation, Gecko DOM reference

jsxGet_offsetTop

public int jsxGet_offsetTop()
Get the offsetTop for this element.

Returns:
a dummy value
See Also:
MSDN documentation

jsxGet_offsetWidth

public int jsxGet_offsetWidth()
Get the offsetWidth for this element.

Returns:
a dummy value compatible with mouse events coordinates
See Also:
MSDN documentation

jsxGet_onblur

public java.lang.Object jsxGet_onblur()
Get the onblur event handler for this element.

Returns:
org.mozilla.javascript.Function

jsxGet_onclick

public java.lang.Object jsxGet_onclick()
Get the onclick event handler for this element.

Returns:
org.mozilla.javascript.Function

jsxGet_oncontextmenu

public java.lang.Object jsxGet_oncontextmenu()
Get the oncontextmenu event handler for this element.

Returns:
org.mozilla.javascript.Function

jsxGet_ondblclick

public java.lang.Object jsxGet_ondblclick()
Get the ondblclick event handler for this element.

Returns:
org.mozilla.javascript.Function

jsxGet_onfocus

public java.lang.Object jsxGet_onfocus()
Get the onfocus event handler for this element.

Returns:
org.mozilla.javascript.Function

jsxGet_onkeydown

public java.lang.Object jsxGet_onkeydown()
Get the onkeydown event handler for this element.

Returns:
org.mozilla.javascript.Function

jsxGet_onkeypress

public java.lang.Object jsxGet_onkeypress()
Get the onkeypress event handler for this element.

Returns:
org.mozilla.javascript.Function

jsxGet_onkeyup

public java.lang.Object jsxGet_onkeyup()
Get the onkeyup event handler for this element.

Returns:
org.mozilla.javascript.Function

jsxGet_onmousedown

public java.lang.Object jsxGet_onmousedown()
Get the onmousedown event handler for this element.

Returns:
org.mozilla.javascript.Function

jsxGet_onmousemove

public java.lang.Object jsxGet_onmousemove()
Get the onmousemove event handler for this element.

Returns:
org.mozilla.javascript.Function

jsxGet_onmouseout

public java.lang.Object jsxGet_onmouseout()
Get the onmouseout event handler for this element.

Returns:
org.mozilla.javascript.Function

jsxGet_onmouseover

public java.lang.Object jsxGet_onmouseover()
Get the onmouseover event handler for this element.

Returns:
org.mozilla.javascript.Function

jsxGet_onmouseup

public java.lang.Object jsxGet_onmouseup()
Get the onmouseup event handler for this element.

Returns:
org.mozilla.javascript.Function

jsxGet_onresize

public java.lang.Object jsxGet_onresize()
Get the onresize event handler for this element.

Returns:
org.mozilla.javascript.Function

jsxGet_outerHTML

public java.lang.String jsxGet_outerHTML()
Gets the outerHTML of the node.

Returns:
the contents of this node as HTML
See Also:
MSDN documentation

jsxGet_ownerDocument

public java.lang.Object jsxGet_ownerDocument()
Return the owner document

Returns:
the document

jsxGet_parentElement

public java.lang.Object jsxGet_parentElement()
Get the JavaScript property "parentElement".

It is identical to NodeImpl.jsxGet_parentNode() with the exception of HTML, which has a null parent element.

Returns:
The parent element
See Also:
NodeImpl.jsxGet_parentNode()

jsxGet_prefix

public java.lang.String jsxGet_prefix()
Returns The Namespace prefix

Returns:
The Namespace prefix.

jsxGet_runtimeStyle

public java.lang.Object jsxGet_runtimeStyle()
Returns the runtime style object for this element.

Returns:
The runtime style object

jsxGet_scrollHeight

public int jsxGet_scrollHeight()
Get the scrollHeight for this element.

Returns:
a dummy value of 10
See Also:
MSDN documentation

jsxGet_scrollLeft

public int jsxGet_scrollLeft()
Get the scrollLeft for this element.

Returns:
a dummy value (default is 0)
See Also:
MSDN documentation

jsxGet_scrollTop

public int jsxGet_scrollTop()
Get the scrollTop for this element.

Returns:
a dummy value (default is 0)
See Also:
MSDN documentation

jsxGet_scrollWidth

public int jsxGet_scrollWidth()
Get the scrollWidth for this element.

Returns:
a dummy value of 10
See Also:
MSDN documentation

jsxGet_style

public java.lang.Object jsxGet_style()
Return the style object for this element.

Returns:
The style object

jsxGet_tagName

public java.lang.String jsxGet_tagName()
Return the tag name of this element.

Returns:
The tag name in uppercase.

jsxGet_title

public java.lang.String jsxGet_title()
Return the element title.

Returns:
The ID of this element.

jsxSet_className

public void jsxSet_className(java.lang.String className)
Set the class attribute for this element.

Parameters:
className - - the new class name

jsxSet_disabled

public void jsxSet_disabled(boolean disabled)
Set whether or not to disable this element

Parameters:
disabled - True if this is to be disabled.

jsxSet_id

public void jsxSet_id(java.lang.String newId)
Set the identifier this element.

Parameters:
newId - The new identifier of this element.

jsxSet_innerHTML

public void jsxSet_innerHTML(java.lang.Object value)
Replace all children elements of this element with the supplied value.

Parameters:
value - - the new value for the contents of this node

jsxSet_innerText

public void jsxSet_innerText(java.lang.String value)
Replace all children elements of this element with the supplied value.

Parameters:
value - - the new value for the contents of this node

jsxSet_onblur

public void jsxSet_onblur(java.lang.Object handler)
Set the onblur event handler for this element.

Parameters:
handler - the new handler

jsxSet_onclick

public void jsxSet_onclick(java.lang.Object handler)
Set the onclick event handler for this element.

Parameters:
handler - the new handler

jsxSet_oncontextmenu

public void jsxSet_oncontextmenu(java.lang.Object handler)
Set the oncontextmenu event handler for this element.

Parameters:
handler - the new handler

jsxSet_ondblclick

public void jsxSet_ondblclick(java.lang.Object handler)
Set the ondblclick event handler for this element.

Parameters:
handler - the new handler

jsxSet_onfocus

public void jsxSet_onfocus(java.lang.Object handler)
Set the onfocus event handler for this element.

Parameters:
handler - the new handler

jsxSet_onkeydown

public void jsxSet_onkeydown(java.lang.Object handler)
Set the onkeydown event handler for this element.

Parameters:
handler - the new handler

jsxSet_onkeypress

public void jsxSet_onkeypress(java.lang.Object handler)
Set the onkeypress event handler for this element.

Parameters:
handler - the new handler

jsxSet_onkeyup

public void jsxSet_onkeyup(java.lang.Object handler)
Set the onkeyup event handler for this element.

Parameters:
handler - the new handler

jsxSet_onmousedown

public void jsxSet_onmousedown(java.lang.Object handler)
Set the onmousedown event handler for this element.

Parameters:
handler - the new handler

jsxSet_onmousemove

public void jsxSet_onmousemove(java.lang.Object handler)
Set the onmousemove event handler for this element.

Parameters:
handler - the new handler

jsxSet_onmouseout

public void jsxSet_onmouseout(java.lang.Object handler)
Set the onmouseout event handler for this element.

Parameters:
handler - the new handler

jsxSet_onmouseover

public void jsxSet_onmouseover(java.lang.Object handler)
Set the onmouseover event handler for this element.

Parameters:
handler - the new handler

jsxSet_onmouseup

public void jsxSet_onmouseup(java.lang.Object handler)
Set the onmouseup event handler for this element.

Parameters:
handler - the new handler

jsxSet_onresize

public void jsxSet_onresize(java.lang.Object handler)
Set the onresize event handler for this element.

Parameters:
handler - the new handler

jsxSet_outerHTML

public void jsxSet_outerHTML(java.lang.String value)
Replace all children elements of this element with the supplied value. Sets the outerHTML of the node.

Parameters:
value - - the new value for replacing this node
See Also:
MSDN documentation

jsxSet_scrollLeft

public void jsxSet_scrollLeft(int scroll)
Set the scrollLeft for this element.

Parameters:
scroll - the new value

jsxSet_scrollTop

public void jsxSet_scrollTop(int scroll)
Set the scrollTop for this element.

Parameters:
scroll - the new value

jsxSet_title

public void jsxSet_title(java.lang.String newTitle)
Set the title of this element.

Parameters:
newTitle - The new identifier of this element.

navigateHomePage

public void navigateHomePage()
                      throws java.io.IOException
Causes the web client to navigate to the current home page. Part of the #default#homePage default IE behavior implementation.

Throws:
java.io.IOException - if loading home page fails

setDomNode

public void setDomNode(DomNode domNode)
Set the DOM node that corresponds to this javascript object

Overrides:
setDomNode in class SimpleScriptable
Parameters:
domNode - The DOM node

setHomePage

public void setHomePage(java.lang.String url)
Sets the web client's current homepage. Part of the #default#homePage default IE behavior implementation.

Parameters:
url - the new homepage URL

startDownload

public void startDownload(java.lang.String uri,
                          org.mozilla.javascript.Function callback)
                   throws java.net.MalformedURLException
Implementation of the IE behavior #default#download

Parameters:
uri - The URI of the download source
callback - the method which should be called when the download is finished
Throws:
java.net.MalformedURLException - If the url cannot be created
See Also:
MSDN documentation

toString

public java.lang.String toString()
Just for debug purposes.

Overrides:
toString in class java.lang.Object


Copyright © 2003-2016 AppPerfect Corporation. All Rights Reserved.