Class HtmlBody

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, org.w3c.dom.Element, org.w3c.dom.Node

    public class HtmlBody
    extends HtmlElement
    Wrapper for the HTML element "body".
    See Also:
    Serialized Form
    • Field Detail

      • TAG_NAME

        public static final java.lang.String TAG_NAME
        The HTML tag represented by this element.
        See Also:
        Constant Field Values
    • Constructor Detail

      • HtmlBody

        public HtmlBody​(java.lang.String qualifiedName,
                        SgmlPage page,
                        java.util.Map<java.lang.String,​DomAttr> attributes,
                        boolean temporary)
        Creates a new instance.
        Parameters:
        qualifiedName - the qualified name of the element type to instantiate
        page - the page that contains this element
        attributes - the initial attributes
        temporary - whether or not this body is temporary (created because the body tag does not exist or has not yet been parsed)
    • Method Detail

      • getOnLoadAttribute

        public final java.lang.String getOnLoadAttribute()
        Returns the value of the attribute onload. Refer to the HTML 4.01 documentation for details on the use of this attribute.
        Returns:
        the value of the attribute onload or an empty string if that attribute isn't defined
      • getOnUnloadAttribute

        public final java.lang.String getOnUnloadAttribute()
        Returns the value of the attribute onunload. Refer to the HTML 4.01 documentation for details on the use of this attribute.
        Returns:
        the value of the attribute onunload or an empty string if that attribute isn't defined
      • getBackgroundAttribute

        public final java.lang.String getBackgroundAttribute()
        Returns the value of the attribute background. Refer to the HTML 4.01 documentation for details on the use of this attribute.
        Returns:
        the value of the attribute background or an empty string if that attribute isn't defined
      • getBgcolorAttribute

        public final java.lang.String getBgcolorAttribute()
        Returns the value of the attribute bgcolor. Refer to the HTML 4.01 documentation for details on the use of this attribute.
        Returns:
        the value of the attribute bgcolor or an empty string if that attribute isn't defined
      • getTextAttribute

        public final java.lang.String getTextAttribute()
        Returns the value of the attribute text. Refer to the HTML 4.01 documentation for details on the use of this attribute.
        Returns:
        the value of the attribute text or an empty string if that attribute isn't defined
      • getLinkAttribute

        public final java.lang.String getLinkAttribute()
        Returns the value of the attribute link. Refer to the HTML 4.01 documentation for details on the use of this attribute.
        Returns:
        the value of the attribute link or an empty string if that attribute isn't defined
      • getVlinkAttribute

        public final java.lang.String getVlinkAttribute()
        Returns the value of the attribute vlink. Refer to the HTML 4.01 documentation for details on the use of this attribute.
        Returns:
        the value of the attribute vlink or an empty string if that attribute isn't defined
      • getAlinkAttribute

        public final java.lang.String getAlinkAttribute()
        Returns the value of the attribute alink. Refer to the HTML 4.01 documentation for details on the use of this attribute.
        Returns:
        the value of the attribute alink or an empty string if that attribute isn't defined
      • isTemporary

        public final boolean isTemporary()
        Returns true if this body is temporary (created because the body tag has not yet been parsed).
        Returns:
        true if this body is temporary (created because the body tag has not yet been parsed)
      • handles

        public boolean handles​(com.gargoylesoftware.htmlunit.javascript.host.event.Event event)
        Indicates if the provided event can be applied to this node. Overwrite this.
        Overrides:
        handles in class HtmlElement
        Parameters:
        event - the event
        Returns:
        false if the event can't be applied