com.gargoylesoftware.htmlunit.javascript.host.html
Class HTMLBodyElement

java.lang.Object
  extended by net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
      extended by com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
          extended by com.gargoylesoftware.htmlunit.javascript.host.Node
              extended by com.gargoylesoftware.htmlunit.javascript.host.EventNode
                  extended by com.gargoylesoftware.htmlunit.javascript.host.Element
                      extended by com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement
                          extended by com.gargoylesoftware.htmlunit.javascript.host.html.HTMLBodyElement
All Implemented Interfaces:
ScriptableWithFallbackGetter, Serializable, Cloneable, net.sourceforge.htmlunit.corejs.javascript.ConstProperties, net.sourceforge.htmlunit.corejs.javascript.debug.DebuggableObject, net.sourceforge.htmlunit.corejs.javascript.Scriptable

public class HTMLBodyElement
extends HTMLElement

The JavaScript object "HTMLBodyElement".

Version:
$Revision: 9084 $
Author:
Ahmed Ashour, Marc Guillemot, Daniel Gredler
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement
HTMLElement.ProxyDomNode
 
Field Summary
 
Fields inherited from class com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement
BEHAVIOR_ID_CLIENT_CAPS, BEHAVIOR_ID_DOWNLOAD, BEHAVIOR_ID_HOMEPAGE
 
Fields inherited from class com.gargoylesoftware.htmlunit.javascript.host.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
 
Fields inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
 
Fields inherited from interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
HTMLBodyElement()
           
 
Method Summary
 void createEventHandlerFromAttribute(String attributeName, String value)
          Creates the event handler from the attribute value.
 String getALink()
          Returns the value of the aLink attribute.
 String getBackground()
          Returns the value of the background attribute.
 String getBgColor()
          Returns the value of the bgColor attribute.
 String getLink()
          Returns the value of the link attribute.
 HTMLElement getOffsetParent_js()
          Returns this element's offsetParent.
 String getText()
          Returns the value of the text attribute.
 String getVLink()
          Returns the value of the vLink attribute.
 void setALink(String aLink)
          Sets the value of the aLink attribute.
 void setBackground(String background)
          Sets the value of the background attribute.
 void setBgColor(String bgColor)
          Sets the value of the bgColor attribute.
 void setDefaults(ComputedCSSStyleDeclaration style)
          Callback method which allows different HTML element types to perform custom initialization of computed styles.
 void setLink(String link)
          Sets the value of the link attribute.
 void setOuterHTML(String value)
          Overwritten to throw an exception in IE8/9.
 void setText(String text)
          Sets the value of the text attribute.
 void setVLink(String vLink)
          Sets the value of the vLink attribute.
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement
addBehavior, addComponentRequest, blur, clearAttributes, clearComponentRequest, click, compareVersions, createEventHandler, createTextRange, dispatchEvent, doComponentRequest, doScroll, fixAttributeName, focus, get, getAccessKey, getAlign, getAll, getAttribute, getAttributeNode, getAttributeNodeNS, getAvailHeight, getAvailWidth, getBoundingClientRect, getBoxObject, getBufferDepth, getCh, getChildren, getChOff, getClassList, getClassName_js, getClientHeight, getClientLeft, getClientRects, getClientTop, getClientWidth, getColorDepth, getComponentVersion, getConnectionType, getCookieEnabled, getCpuClass, getDataset, getDefaultStyleDisplay, getDir, getDisabled, getDocument, getDomNodeOrDie, getDomNodeOrNull, getElementsByClassName, getFilters, getHeight, getId, getInnerHTML, getInnerText, getJavaEnabled, getLang, getLanguage, getLocalName, getNodeName, getOffsetHeight, getOffsetLeft, getOffsetTop, getOffsetWidth, getOnchange, getOnsubmit, getOuterHTML, getParentElement, getParentHTMLElement, getPlatform, getPosX, getPosY, getPrefix, getScopeName, getScrollHeight, getScrollLeft, getScrollTop, getScrollWidth, getSpellcheck, getSystemLanguage, getTabIndex, getTagName, getTagUrn, getTitle, getUniqueID, getUserLanguage, getVAlign, getWidth, getWidthOrHeight, getWithFallback, hasAttribute, insertAdjacentElement, insertAdjacentHTML, insertAdjacentText, isAncestorOfEventTarget, isAttributeName, isComponentInstalled, isEndTagForbidden, isHomePage, isLowerCaseInOuterHtml, mergeAttributes, navigateHomePage, parseHtmlSnippet, querySelector, querySelectorAll, readAttributes, removeAttributeNode, removeBehavior, removeExpression, removeNode, scrollIntoView, setAccessKey, setActive, setAlign, setAttribute, setCh, setChOff, setClassName, setColorAttribute, setDir, setDisabled, setDomNode, setExpression, setHomePage, setId, setInnerHTML, setInnerText, setInnerTextImpl, setLang, setLanguage, setOnchange, setOnsubmit, setScrollLeft, setScrollTop, setSpellcheck, setTabIndex, setTagUrn, setTextContent, setTitle, setVAlign, setWidthOrHeight, startDownload, toString
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.Element
createAttributesObject, getAttributeNS, getAttributes, getBaseURI, getChildElementCount, getCurrentStyle, getElementsByTagName, getElementsByTagNameNS, getFirstElementChild, getLastElementChild, getNextElementSibling, getPreviousElementSibling, getRuntimeStyle, getStyle, hasAttributeNS, removeAttribute, removeAttributeNS, selectNodes, selectSingleNode, setAttributeNode, setAttributeNS
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.EventNode
fireEvent, getOnblur, getOnclick, getOncontextmenu, getOndblclick, getOnerror, getOnfocus, getOnfocusin, getOnfocusout, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnpropertychange, getOnresize, setOnblur, setOnclick, setOncontextmenu, setOndblclick, setOnerror, setOnfocus, setOnfocusin, setOnfocusout, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnpropertychange, setOnresize
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.Node
addEventListener, appendChild, asJavaScriptException, attachEvent, cloneNode, compareDocumentPosition, contains, detachEvent, executeEvent, fireEvent, fireEvent, getBaseName, getChildNodes, getEventHandler, getEventHandlerProp, getFirstChild, getJavaScriptNode, getLastChild, getNamespaceURI, getNextSibling, getNodeType, getNodeValue, getOwnerDocument, getParent, getParentNode, getPreviousSibling, getTextContent, getXml, hasChildNodes, hasEventHandlers, insertBefore, insertBeforeImpl, isSameNode, normalize, removeChild, removeEventListener, replaceChild, setEventHandler, setEventHandlerProp, setNodeValue
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
clone, defineFunctionProperties, defineProperty, equivalentValues, getBrowserVersion, getClassName, getDefaultValue, getPrototype, getScriptableFor, getStartingScope, getTransformerScriptableFor, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, isReadOnlySettable, makeScriptableFor, setCaseSensitive, setDomNode, setHtmlElement, setParentScope
 
Methods inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
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, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, 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, setGetterOrSetter, setPrototype, size
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
delete, delete, get, getClassName, getDefaultValue, getIds, getParentScope, getPrototype, has, has, hasInstance, put, put, setParentScope, setPrototype
 

Constructor Detail

HTMLBodyElement

public HTMLBodyElement()
Method Detail

createEventHandlerFromAttribute

public void createEventHandlerFromAttribute(String attributeName,
                                            String value)
Creates the event handler from the attribute value. This has to be done no matter which browser is simulated to handle ill-formed HTML code with many body (possibly generated) elements.

Parameters:
attributeName - the attribute name
value - the value

setDefaults

public void setDefaults(ComputedCSSStyleDeclaration style)
Callback method which allows different HTML element types to perform custom initialization of computed styles. For example, body elements in most browsers have default values for their margins.

Overrides:
setDefaults in class Element
Parameters:
style - the style to initialize

getOffsetParent_js

public HTMLElement getOffsetParent_js()
Returns this element's offsetParent. The offsetLeft and offsetTop attributes are relative to the offsetParent.

Overrides:
getOffsetParent_js in class HTMLElement
Returns:
this element's offsetParent. This may be undefined when this node is not attached or null for body.
See Also:
MSDN Documentation, Gecko DOM Reference, Element Dimensions, Box Model, Reverse Engineering by Anne van Kesteren

getALink

public String getALink()
Returns the value of the aLink attribute.

Returns:
the value of the aLink attribute
See Also:
MSDN Documentation

setALink

public void setALink(String aLink)
Sets the value of the aLink attribute.

Parameters:
aLink - the value of the aLink attribute
See Also:
MSDN Documentation

getBackground

public String getBackground()
Returns the value of the background attribute.

Returns:
the value of the background attribute
See Also:
MSDN Documentation

setBackground

public void setBackground(String background)
Sets the value of the background attribute.

Parameters:
background - the value of the background attribute
See Also:
MSDN Documentation

getBgColor

public String getBgColor()
Returns the value of the bgColor attribute.

Returns:
the value of the bgColor attribute
See Also:
MSDN Documentation

setBgColor

public void setBgColor(String bgColor)
Sets the value of the bgColor attribute.

Parameters:
bgColor - the value of the bgColor attribute
See Also:
MSDN Documentation

getLink

public String getLink()
Returns the value of the link attribute.

Returns:
the value of the link attribute
See Also:
MSDN Documentation

setLink

public void setLink(String link)
Sets the value of the link attribute.

Parameters:
link - the value of the link attribute
See Also:
MSDN Documentation

getText

public String getText()
Returns the value of the text attribute.

Overrides:
getText in class Element
Returns:
the value of the text attribute
See Also:
MSDN Documentation

setText

public void setText(String text)
Sets the value of the text attribute.

Parameters:
text - the value of the text attribute
See Also:
MSDN Documentation

getVLink

public String getVLink()
Returns the value of the vLink attribute.

Returns:
the value of the vLink attribute
See Also:
MSDN Documentation

setVLink

public void setVLink(String vLink)
Sets the value of the vLink attribute.

Parameters:
vLink - the value of the vLink attribute
See Also:
MSDN Documentation

setOuterHTML

public void setOuterHTML(String value)
Overwritten to throw an exception in IE8/9.

Overrides:
setOuterHTML in class HTMLElement
Parameters:
value - the new value for replacing this node


Copyright © 2002–2014 Gargoyle Software Inc.. All rights reserved.