Class HTMLBodyElement

All Implemented Interfaces:
Serializable, Cloneable, org.htmlunit.corejs.javascript.ConstProperties, org.htmlunit.corejs.javascript.debug.DebuggableObject, org.htmlunit.corejs.javascript.Scriptable, org.htmlunit.corejs.javascript.SymbolScriptable

public class HTMLBodyElement extends HTMLElement
The JavaScript object HTMLBodyElement.
See Also:
  • Constructor Details

    • HTMLBodyElement

      public HTMLBodyElement()
      Creates an instance.
  • Method Details

    • jsConstructor

      public void jsConstructor()
      JavaScript constructor.
      Overrides:
      jsConstructor in class HTMLElement
    • 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
    • isEventHandlerOnWindow

      protected boolean isEventHandlerOnWindow()
      Is setting event handler property, at window-level.
      Overrides:
      isEventHandlerOnWindow in class EventTarget
      Returns:
      whether the event handler to be set at window-level
    • 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:
    • getALink

      public String getALink()
      Returns the value of the aLink attribute.
      Returns:
      the value of the aLink attribute
      See Also:
    • setALink

      public void setALink(String aLink)
      Sets the value of the aLink attribute.
      Parameters:
      aLink - the value of the aLink attribute
      See Also:
    • getBackground

      public String getBackground()
      Returns the value of the background attribute.
      Returns:
      the value of the background attribute
      See Also:
    • setBackground

      public void setBackground(String background)
      Sets the value of the background attribute.
      Parameters:
      background - the value of the background attribute
      See Also:
    • getBgColor

      public String getBgColor()
      Returns the value of the bgColor attribute.
      Returns:
      the value of the bgColor attribute
      See Also:
    • setBgColor

      public void setBgColor(String bgColor)
      Sets the value of the bgColor attribute.
      Parameters:
      bgColor - the value of the bgColor attribute
      See Also:
    • getLink

      public String getLink()
      Returns the value of the link attribute.
      Returns:
      the value of the link attribute
      See Also:
    • setLink

      public void setLink(String link)
      Sets the value of the link attribute.
      Parameters:
      link - the value of the link attribute
      See Also:
    • getText

      public String getText()
      Returns the value of the text attribute.
      Returns:
      the value of the text attribute
      See Also:
    • setText

      public void setText(String text)
      Sets the value of the text attribute.
      Parameters:
      text - the value of the text attribute
      See Also:
    • getVLink

      public String getVLink()
      Returns the value of the vLink attribute.
      Returns:
      the value of the vLink attribute
      See Also:
    • setVLink

      public void setVLink(String vLink)
      Sets the value of the vLink attribute.
      Parameters:
      vLink - the value of the vLink attribute
      See Also:
    • getClientWidth

      public int getClientWidth()
      Returns the clientWidth attribute.
      Overrides:
      getClientWidth in class Element
      Returns:
      the clientWidth attribute
    • getOnload

      public Object getOnload()
      Returns the onload event handler for this element.
      Overrides:
      getOnload in class HTMLElement
      Returns:
      the onload event handler for this element
    • setOnload

      public void setOnload(Object onload)
      Sets the onload event handler for this element.
      Overrides:
      setOnload in class HTMLElement
      Parameters:
      onload - the onload event handler for this element
    • setOnblur

      public void setOnblur(Object handler)
      Sets the onblur event handler for this element.
      Overrides:
      setOnblur in class HTMLElement
      Parameters:
      handler - the onblur event handler for this element
    • getOnblur

      public Object getOnblur()
      Returns the onblur event handler for this element.
      Overrides:
      getOnblur in class HTMLElement
      Returns:
      the onblur event handler for this element
    • setOnfocus

      public void setOnfocus(Object handler)
      Sets the onfocus event handler for this element.
      Overrides:
      setOnfocus in class HTMLElement
      Parameters:
      handler - the onfocus event handler for this element
    • getOnfocus

      public Object getOnfocus()
      Returns the onfocus event handler for this element.
      Overrides:
      getOnfocus in class HTMLElement
      Returns:
      the onfocus event handler for this element
    • setOnerror

      public void setOnerror(Object handler)
      Sets the onerror event handler for this element.
      Overrides:
      setOnerror in class HTMLElement
      Parameters:
      handler - the onerror event handler for this element
    • getOnerror

      public Object getOnerror()
      Returns the onerror event handler for this element.
      Overrides:
      getOnerror in class HTMLElement
      Returns:
      the onerror event handler for this element
    • getOnbeforeunload

      public org.htmlunit.corejs.javascript.Function getOnbeforeunload()
      Returns the onbeforeunload event handler for this element.
      Returns:
      the onbeforeunload event handler for this element
    • setOnbeforeunload

      public void setOnbeforeunload(Object onbeforeunload)
      Sets the onbeforeunload event handler for this element.
      Parameters:
      onbeforeunload - the onbeforeunload event handler for this element
    • getOngamepadconnected

      public org.htmlunit.corejs.javascript.Function getOngamepadconnected()
      Returns the ongamepadconnected event handler.
      Returns:
      the ongamepadconnected event handler
    • setOngamepadconnected

      public void setOngamepadconnected(Object gamepadconnected)
      Sets the ongamepadconnected event handler.
      Parameters:
      gamepadconnected - the ongamepadconnected event handler
    • getOngamepaddisconnected

      public org.htmlunit.corejs.javascript.Function getOngamepaddisconnected()
      Returns the ongamepaddisconnected event handler.
      Returns:
      the ongamepaddisconnected event handler
    • setOngamepaddisconnected

      public void setOngamepaddisconnected(Object gamepaddisconnected)
      Sets the ongamepaddisconnected event handler.
      Parameters:
      gamepaddisconnected - the ongamepaddisconnected event handler
    • getOnhashchange

      public org.htmlunit.corejs.javascript.Function getOnhashchange()
      Returns the onhashchange event handler for this element.
      Returns:
      the onhashchange event handler for this element
    • setOnhashchange

      public void setOnhashchange(Object onhashchange)
      Sets the onhashchange event handler for this element.
      Parameters:
      onhashchange - the onhashchange event handler for this element
    • getOnlanguagechange

      public org.htmlunit.corejs.javascript.Function getOnlanguagechange()
      Returns the onlanguagechange event handler for this element.
      Returns:
      the onlanguagechange event handler for this element
    • setOnlanguagechange

      public void setOnlanguagechange(Object onlanguagechange)
      Sets the onlanguagechange event handler for this element.
      Parameters:
      onlanguagechange - the onlanguagechange event handler for this element
    • getOnmessage

      public org.htmlunit.corejs.javascript.Function getOnmessage()
      Returns the onmessage event handler for this element.
      Returns:
      the onmessage event handler for this element
    • setOnmessage

      public void setOnmessage(Object onmessage)
      Sets the onmessage event handler for this element.
      Parameters:
      onmessage - the onmessage event handler for this element
    • getOnoffline

      public org.htmlunit.corejs.javascript.Function getOnoffline()
      Returns the onoffline event handler for this element.
      Returns:
      the onoffline event handler for this element
    • setOnoffline

      public void setOnoffline(Object onoffline)
      Sets the onoffline event handler for this element.
      Parameters:
      onoffline - the onoffline event handler for this element
    • getOnonline

      public org.htmlunit.corejs.javascript.Function getOnonline()
      Returns the ononline event handler for this element.
      Returns:
      the ononline event handler for this element
    • setOnonline

      public void setOnonline(Object ononline)
      Sets the ononline event handler for this element.
      Parameters:
      ononline - the ononline event handler for this element
    • getOnpagehide

      public org.htmlunit.corejs.javascript.Function getOnpagehide()
      Returns the onpagehide event handler for this element.
      Returns:
      the onpagehide event handler for this element
    • setOnpagehide

      public void setOnpagehide(Object onpagehide)
      Sets the onpagehide event handler for this element.
      Parameters:
      onpagehide - the onpagehide event handler for this element
    • getOnpageshow

      public org.htmlunit.corejs.javascript.Function getOnpageshow()
      Returns the onpageshow event handler for this element.
      Returns:
      the onpageshow event handler for this element
    • setOnpageshow

      public void setOnpageshow(Object onpageshow)
      Sets the onpageshow event handler for this element.
      Parameters:
      onpageshow - the onpageshow event handler for this element
    • getOnpopstate

      public org.htmlunit.corejs.javascript.Function getOnpopstate()
      Returns the onpopstate event handler for this element.
      Returns:
      the onpopstate event handler for this element
    • setOnpopstate

      public void setOnpopstate(Object onpopstate)
      Sets the onpopstate event handler for this element.
      Parameters:
      onpopstate - the onpopstate event handler for this element
    • getOnrejectionhandled

      public org.htmlunit.corejs.javascript.Function getOnrejectionhandled()
      Returns the onrejectionhandled event handler for this element.
      Returns:
      the onrejectionhandled event handler for this element
    • setOnrejectionhandled

      public void setOnrejectionhandled(Object onrejectionhandled)
      Sets the onrejectionhandled event handler for this element.
      Parameters:
      onrejectionhandled - the onrejectionhandled event handler for this element
    • getOnstorage

      public org.htmlunit.corejs.javascript.Function getOnstorage()
      Returns the onstorage event handler for this element.
      Returns:
      the onstorage event handler for this element
    • setOnstorage

      public void setOnstorage(Object onstorage)
      Sets the onstorage event handler for this element.
      Parameters:
      onstorage - the onstorage event handler for this element
    • getOnunhandledrejection

      public org.htmlunit.corejs.javascript.Function getOnunhandledrejection()
      Returns the onunhandledrejection event handler for this element.
      Returns:
      the onunhandledrejection event handler for this element
    • setOnunhandledrejection

      public void setOnunhandledrejection(Object onunhandledrejection)
      Sets the onunhandledrejection event handler for this element.
      Parameters:
      onunhandledrejection - the onunhandledrejection event handler for this element
    • getOnunload

      public org.htmlunit.corejs.javascript.Function getOnunload()
      Returns the onunload event handler for this element.
      Returns:
      the onunload event handler for this element
    • setOnunload

      public void setOnunload(Object onunload)
      Sets the onunload event handler for this element.
      Parameters:
      onunload - the onunload event handler for this element
    • getOnafterprint

      public org.htmlunit.corejs.javascript.Function getOnafterprint()
      Returns the onafterprint event handler for this element.
      Returns:
      the onafterprint event handler for this element
    • setOnafterprint

      public void setOnafterprint(Object onafterprint)
      Sets the onafterprint event handler for this element.
      Parameters:
      onafterprint - the onafterprint event handler for this element
    • getOnbeforeprint

      public org.htmlunit.corejs.javascript.Function getOnbeforeprint()
      Returns the onbeforeprint event handler for this element.
      Returns:
      the onbeforeprint event handler for this element
    • setOnbeforeprint

      public void setOnbeforeprint(Object onbeforeprint)
      Sets the onbeforeprint event handler for this element.
      Parameters:
      onbeforeprint - the onbeforeprint event handler for this element
    • getOnmessageerror

      public org.htmlunit.corejs.javascript.Function getOnmessageerror()
      Returns the onmessageerror event handler for this element.
      Returns:
      the onmessageerror event handler for this element
    • setOnmessageerror

      public void setOnmessageerror(Object onmessageerror)
      Sets the onmessageerror event handler for this element.
      Parameters:
      onmessageerror - the onmessageerror event handler for this element
    • getOnresize

      public org.htmlunit.corejs.javascript.Function getOnresize()
      Returns the onresize event handler for this element.
      Overrides:
      getOnresize in class HTMLElement
      Returns:
      the onresize event handler for this element
    • setOnresize

      public void setOnresize(Object onresize)
      Sets the onresize event handler for this element.
      Overrides:
      setOnresize in class HTMLElement
      Parameters:
      onresize - the onresize event handler for this element
    • getOnscroll

      public org.htmlunit.corejs.javascript.Function getOnscroll()
      Returns the onscroll event handler for this element.
      Overrides:
      getOnscroll in class HTMLElement
      Returns:
      the onscroll event handler for this element
    • setOnscroll

      public void setOnscroll(Object onresize)
      Sets the onscroll event handler for this element.
      Overrides:
      setOnscroll in class HTMLElement
      Parameters:
      onresize - the onscroll event handler for this element