Interface HTMLElement

All Superinterfaces:
ScriptingEventHandler
All Known Implementing Classes:
BlockElement, Button, FormControl, RadioButtonFormControl, RadioGroupFormControl, ResetButton, SubmitButton, TableCell, TableRow, TextBlock, WebApplet, WebForm, WebImage, WebLink, WebList, WebRequestSource, WebTable

public interface HTMLElement extends ScriptingEventHandler
An interface which defines the common properties for an HTML element, which can correspond to any HTML tag.
Since:
1.5.2
Author:
Russell Gold
  • Method Details

    • getID

      String getID()
      Returns the ID associated with this element. IDs are unique throughout the HTML document.
    • getClassName

      String getClassName()
      Returns the class associated with this element.
    • getName

      String getName()
      Returns the name associated with this element.
    • getTitle

      String getTitle()
      Returns the title associated with this element.
    • getAttribute

      String getAttribute(String name)
      Returns the value of the attribute of this element with the specified name. Returns the empty string if no such attribute exists.
      Since:
      1.6
    • setAttribute

      void setAttribute(String name, Object value)
      Set the value of the attribute of this element with the specified name.
      Since:
      1.7
    • removeAttribute

      void removeAttribute(String name)
      Remove the attribute of this element with the specified name.
      Since:
      1.7
    • isSupportedAttribute

      boolean isSupportedAttribute(String name)
      Returns true if this element may have an attribute with the specified name.
      Since:
      1.6
    • getScriptingHandler

      ScriptingHandler getScriptingHandler()
      Returns the delegate which supports scripting this element.
    • getText

      String getText()
      Returns the contents of this element, converted to a string.
      Since:
      1.6
    • getTagName

      String getTagName()
      Returns the tag name of this node.
      Since:
      1.6.1
    • newScriptable

      ScriptableDelegate newScriptable()
    • getParentDelegate

      ScriptableDelegate getParentDelegate()
      Returns the scriptable delegate which can provide the scriptable delegate for this element.
    • getNode

      Node getNode()
      Returns the DOM node underlying this element.