Class Hyperlink


public class Hyperlink extends A
Defines a simple hyperlink class.
Examples:

@Rest public class MyRest extends BasicRestServlet { // Produces <a href="/foo">bar</a> @RestGet public Hyperlink a01() { return new Hyperlink("foo", "bar"); } // Produces <ul><li><a href="/foo">bar</a></li></ul> @RestGet public Hyperlink[] a02() { return new Hyperlink[]{a01()}; } // Produces <ul><li><a href="/foo">bar</a></li></ul> @RestGet public Collection<Hyperlink> a03() { return Arrays.asList(a02()); } }

See Also:
  • Constructor Details

  • Method Details

    • create

      public static Hyperlink create(Object href, Object... children)
      Static creator.
      Parameters:
      href - The A.href(Object) attribute.
      children - The HtmlElementMixed.children(Object[]) nodes.
      Returns:
      A new Hyperlink object.
    • class_

      public Hyperlink class_(String value)
      Description copied from class: HtmlElement
      class attribute.

      Specifies one or more CSS class names for the element, separated by spaces. These classes can be used for styling and JavaScript selection.

      Overrides:
      class_ in class HtmlElement<A>
      Parameters:
      value - Space-separated CSS class names (e.g., "btn btn-primary"). Can be null to unset the attribute.
      Returns:
      This object.
    • accesskey

      public Hyperlink accesskey(String value)
      Description copied from class: HtmlElement
      accesskey attribute.

      Defines a keyboard shortcut to activate or focus an element. The value should be a single character that, when pressed with a modifier key (usually Alt), activates the element.

      Overrides:
      accesskey in class HtmlElement<A>
      Parameters:
      value - The keyboard shortcut character (e.g., "a", "1"). Can be null to unset the attribute.
      Returns:
      This object.
    • attr

      public Hyperlink attr(String key, Object val)
      Description copied from class: HtmlElement
      Adds an arbitrary attribute to this element.
      Overrides:
      attr in class HtmlElement<A>
      Parameters:
      key - The attribute name.
      val - The attribute value. Can be null to remove the attribute.
      Returns:
      This object.
    • attrUri

      public Hyperlink attrUri(String key, Object val)
      Description copied from class: HtmlElement
      Adds an arbitrary URI attribute to this element.

      Same as HtmlElement.attr(String, Object), except if the value is a string that appears to be a URI (e.g. "servlet:/xxx").

      The value can be of any of the following types: URI, URL, String. Strings must be valid URIs.

      URIs defined by UriResolver can be used for values.

      Overrides:
      attrUri in class HtmlElement<A>
      Parameters:
      key - The attribute name.
      val - The attribute value. Can be null, in which case the attribute is added with a null value (unlike HtmlElement.attr(String, Object), the key is not removed).
      Returns:
      This object.
    • child

      public Hyperlink child(Object value)
      Description copied from class: HtmlElementMixed
      Adds a child element to this element.
      Overrides:
      child in class HtmlElementMixed<A>
      Parameters:
      value - The child to add as a child element. Can be a string or HtmlElement. Can also be a container of strings and elements. Can be null (a null entry is added to the children list).
      Returns:
      This object.
    • children

      public Hyperlink children(Object... value)
      Description copied from class: HtmlElementMixed
      Adds one or more child elements to this element.
      Overrides:
      children in class HtmlElementMixed<A>
      Parameters:
      value - The children to add as child elements. Can be a mixture of strings and HtmlElement objects. Can also be containers of strings and elements. Must not be null.
      Returns:
      This object.
    • contenteditable

      Description copied from class: HtmlElement
      contenteditable attribute.

      Indicates whether the element's content is editable by the user.

      Possible values:

      • "true" or empty string - Element content is editable
      • "false" - Element content is not editable
      • "plaintext-only" - Element content is editable, but rich text formatting is disabled
      Overrides:
      contenteditable in class HtmlElement<A>
      Parameters:
      value - The editability state of the element. Can be null to unset the attribute.
      Returns:
      This object.
    • dir

      public Hyperlink dir(String value)
      Description copied from class: HtmlElement
      dir attribute.

      Specifies the text direction of the element's content.

      Possible values:

      • "ltr" - Left-to-right text direction
      • "rtl" - Right-to-left text direction
      • "auto" - Browser determines direction based on content
      Overrides:
      dir in class HtmlElement<A>
      Parameters:
      value - The text direction for the element. Can be null to unset the attribute.
      Returns:
      This object.
    • download

      public Hyperlink download(Object value)
      Description copied from class: A
      download attribute.

      Whether to download the resource instead of navigating to it, and its file name if so.

      Overrides:
      download in class A
      Parameters:
      value - The new value for this attribute. Typically a Boolean or String. Can be null to unset the attribute.
      Returns:
      This object.
    • hidden

      public Hyperlink hidden(Object value)
      Description copied from class: HtmlElement
      hidden attribute.

      This attribute uses deminimized values:

      • false - Attribute is not added
      • true - Attribute is added as "hidden"
      • Other values - Passed through as-is
      Overrides:
      hidden in class HtmlElement<A>
      Parameters:
      value - The new value for this attribute. Typically a Boolean or String. Can be null to unset the attribute.
      Returns:
      This object.
    • href

      public Hyperlink href(Object value)
      Description copied from class: A
      href attribute.

      Address of the hyperlink.

      The value can be of any of the following types: URI, URL, String. Strings must be valid URIs.

      URIs defined by UriResolver can be used for values.

      Overrides:
      href in class A
      Parameters:
      value - The new value for this attribute. Typically a URL or String. Can be null, in which case the attribute is stored with a null value (not removed).
      Returns:
      This object.
    • hreflang

      public Hyperlink hreflang(String value)
      Description copied from class: A
      hreflang attribute.

      Specifies the language of the linked resource. Used for SEO and accessibility purposes.

      Examples:

      • "en" - English
      • "es" - Spanish
      • "fr" - French
      • "de" - German
      • "zh" - Chinese
      • "ja" - Japanese
      Overrides:
      hreflang in class A
      Parameters:
      value - The language code of the linked resource. Can be null to unset the attribute.
      Returns:
      This object.
    • id

      public Hyperlink id(String value)
      Description copied from class: HtmlElement
      id attribute.

      Specifies a unique identifier for the element. The ID must be unique within the document and can be used for CSS styling, JavaScript selection, and anchor links.

      Overrides:
      id in class HtmlElement<A>
      Parameters:
      value - A unique identifier for the element (e.g., "header", "main-content"). Can be null to unset the attribute.
      Returns:
      This object.
    • lang

      public Hyperlink lang(String value)
      Description copied from class: HtmlElement
      lang attribute.

      Specifies the primary language of the element's content using a language tag. This helps with accessibility, search engines, and browser features like spell checking.

      Overrides:
      lang in class HtmlElement<A>
      Parameters:
      value - A language tag (e.g., "en", "en-US", "es", "fr-CA"). Can be null to unset the attribute.
      Returns:
      This object.
    • onabort

      public Hyperlink onabort(String value)
      Description copied from class: HtmlElement
      onabort attribute.

      Event handler for when an operation is aborted (e.g., image loading is cancelled).

      Overrides:
      onabort in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the abort event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onblur

      public Hyperlink onblur(String value)
      Description copied from class: HtmlElement
      onblur attribute.

      Event handler for when the element loses focus.

      Note:

      If your HTML serializer is configured to use single quotes for attribute values, you should use double quotes in your JavaScript code, and vice versa. Otherwise, the quotes will be converted to HTML entities. For example:

      • If using single quotes for attributes: onblur("validate(\"email\")")
      • If using double quotes for attributes: onblur("validate('email')")
      Overrides:
      onblur in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the element loses focus. Can be null to unset the attribute.
      Returns:
      This object.
    • oncancel

      public Hyperlink oncancel(String value)
      Description copied from class: HtmlElement
      oncancel attribute.

      Event handler for when a dialog is cancelled.

      Overrides:
      oncancel in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the cancel event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • oncanplay

      public Hyperlink oncanplay(String value)
      Description copied from class: HtmlElement
      oncanplay attribute.

      Event handler for when the media can start playing (enough data has been buffered).

      Overrides:
      oncanplay in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the canplay event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • oncanplaythrough

      Description copied from class: HtmlElement
      oncanplaythrough attribute.

      Event handler for when the media can play through to the end without buffering.

      Overrides:
      oncanplaythrough in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the canplaythrough event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onchange

      public Hyperlink onchange(String value)
      Description copied from class: HtmlElement
      onchange attribute.

      Event handler for when the value of a form element changes and loses focus.

      Note:

      If your HTML serializer is configured to use single quotes for attribute values, you should use double quotes in your JavaScript code, and vice versa. Otherwise, the quotes will be converted to HTML entities. For example:

      • If using single quotes for attributes: onchange("validate(\"field\")")
      • If using double quotes for attributes: onchange("validate('field')")
      Overrides:
      onchange in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the change event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onclick

      public Hyperlink onclick(String value)
      Description copied from class: HtmlElement
      onclick attribute.

      Event handler for when the element is clicked.

      Note:

      If your HTML serializer is configured to use single quotes for attribute values, you should use double quotes in your JavaScript code, and vice versa. Otherwise, the quotes will be converted to HTML entities. For example:

      • If using single quotes for attributes: onclick("alert(\"Hello\")")
      • If using double quotes for attributes: onclick("alert('Hello')")
      Overrides:
      onclick in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the click event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • oncuechange

      public Hyperlink oncuechange(String value)
      Description copied from class: HtmlElement
      oncuechange attribute.

      Event handler for when a text track cue changes.

      Overrides:
      oncuechange in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the cuechange event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • ondblclick

      public Hyperlink ondblclick(String value)
      Description copied from class: HtmlElement
      ondblclick attribute.

      Event handler for when the element is double-clicked.

      Overrides:
      ondblclick in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the dblclick event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • ondurationchange

      Description copied from class: HtmlElement
      ondurationchange attribute.

      Event handler for when the duration of the media changes.

      Overrides:
      ondurationchange in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the durationchange event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onemptied

      public Hyperlink onemptied(String value)
      Description copied from class: HtmlElement
      onemptied attribute.

      Event handler for when the media element becomes empty (e.g., network error).

      Overrides:
      onemptied in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the emptied event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onended

      public Hyperlink onended(String value)
      Description copied from class: HtmlElement
      onended attribute.

      Event handler for when the media playback reaches the end.

      Overrides:
      onended in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the ended event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onerror

      public Hyperlink onerror(String value)
      Description copied from class: HtmlElement
      onerror attribute.

      Event handler for when an error occurs (e.g., failed resource loading).

      Overrides:
      onerror in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the error event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onfocus

      public Hyperlink onfocus(String value)
      Description copied from class: HtmlElement
      onfocus attribute.

      Event handler for when the element receives focus.

      Note:

      If your HTML serializer is configured to use single quotes for attribute values, you should use double quotes in your JavaScript code, and vice versa. Otherwise, the quotes will be converted to HTML entities. For example:

      • If using single quotes for attributes: onfocus("highlight(\"field\")")
      • If using double quotes for attributes: onfocus("highlight('field')")
      Overrides:
      onfocus in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the focus event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • oninput

      public Hyperlink oninput(String value)
      Description copied from class: HtmlElement
      oninput attribute.

      Event handler for when the value of an input element changes (fires on every keystroke).

      Overrides:
      oninput in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the input event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • oninvalid

      public Hyperlink oninvalid(String value)
      Description copied from class: HtmlElement
      oninvalid attribute.

      Event handler for when form validation fails.

      Overrides:
      oninvalid in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the invalid event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onkeydown

      public Hyperlink onkeydown(String value)
      Description copied from class: HtmlElement
      onkeydown attribute.

      Event handler for when a key is pressed down.

      Overrides:
      onkeydown in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the keydown event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onkeypress

      public Hyperlink onkeypress(String value)
      Description copied from class: HtmlElement
      onkeypress attribute.

      Event handler for when a key is pressed (deprecated, use onkeydown instead).

      Overrides:
      onkeypress in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the keypress event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onkeyup

      public Hyperlink onkeyup(String value)
      Description copied from class: HtmlElement
      onkeyup attribute.

      Event handler for when a key is released.

      Overrides:
      onkeyup in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the keyup event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onload

      public Hyperlink onload(String value)
      Description copied from class: HtmlElement
      onload attribute.

      Event handler for when the element and its resources have finished loading.

      Note:

      If your HTML serializer is configured to use single quotes for attribute values, you should use double quotes in your JavaScript code, and vice versa. Otherwise, the quotes will be converted to HTML entities. For example:

      • If using single quotes for attributes: onload("init(\"config\")")
      • If using double quotes for attributes: onload("init('config')")
      Overrides:
      onload in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the load event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onloadeddata

      public Hyperlink onloadeddata(String value)
      Description copied from class: HtmlElement
      onloadeddata attribute.

      Event handler for when the first frame of media has finished loading.

      Overrides:
      onloadeddata in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the loadeddata event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onloadedmetadata

      Description copied from class: HtmlElement
      onloadedmetadata attribute.

      Event handler for when metadata (duration, dimensions, etc.) has been loaded.

      Overrides:
      onloadedmetadata in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the loadedmetadata event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onloadstart

      public Hyperlink onloadstart(String value)
      Description copied from class: HtmlElement
      onloadstart attribute.

      Event handler for when the browser starts loading the media.

      Overrides:
      onloadstart in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the loadstart event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onmousedown

      public Hyperlink onmousedown(String value)
      Description copied from class: HtmlElement
      onmousedown attribute.

      Event handler for when a mouse button is pressed down on the element.

      Overrides:
      onmousedown in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the mousedown event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onmouseenter

      public Hyperlink onmouseenter(String value)
      Description copied from class: HtmlElement
      onmouseenter attribute.

      Event handler for when the mouse pointer enters the element (does not bubble).

      Overrides:
      onmouseenter in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the mouseenter event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onmouseleave

      public Hyperlink onmouseleave(String value)
      Description copied from class: HtmlElement
      onmouseleave attribute.

      Event handler for when the mouse pointer leaves the element (does not bubble).

      Overrides:
      onmouseleave in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the mouseleave event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onmousemove

      public Hyperlink onmousemove(String value)
      Description copied from class: HtmlElement
      onmousemove attribute.

      Event handler for when the mouse pointer moves over the element.

      Overrides:
      onmousemove in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the mousemove event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onmouseout

      public Hyperlink onmouseout(String value)
      Description copied from class: HtmlElement
      onmouseout attribute.

      Event handler for when the mouse pointer moves out of the element (bubbles).

      Overrides:
      onmouseout in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the mouseout event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onmouseover

      public Hyperlink onmouseover(String value)
      Description copied from class: HtmlElement
      onmouseover attribute.

      Event handler for when the mouse pointer moves over the element (bubbles).

      Note:

      If your HTML serializer is configured to use single quotes for attribute values, you should use double quotes in your JavaScript code, and vice versa. Otherwise, the quotes will be converted to HTML entities. For example:

      • If using single quotes for attributes: onmouseover("showTooltip(\"info\")")
      • If using double quotes for attributes: onmouseover("showTooltip('info')")
      Overrides:
      onmouseover in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the mouseover event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onmouseup

      public Hyperlink onmouseup(String value)
      Description copied from class: HtmlElement
      onmouseup attribute.

      Event handler for when a mouse button is released over the element.

      Overrides:
      onmouseup in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the mouseup event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onmousewheel

      public Hyperlink onmousewheel(String value)
      Description copied from class: HtmlElement
      onmousewheel attribute.

      Event handler for when the mouse wheel is rotated over the element (deprecated, use onwheel).

      Overrides:
      onmousewheel in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the mousewheel event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onpause

      public Hyperlink onpause(String value)
      Description copied from class: HtmlElement
      onpause attribute.

      Event handler for when media playback is paused.

      Overrides:
      onpause in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the pause event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onplay

      public Hyperlink onplay(String value)
      Description copied from class: HtmlElement
      onplay attribute.

      Event handler for when media playback starts.

      Overrides:
      onplay in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the play event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onplaying

      public Hyperlink onplaying(String value)
      Description copied from class: HtmlElement
      onplaying attribute.

      Event handler for when media playback starts after being paused or delayed.

      Overrides:
      onplaying in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the playing event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onprogress

      public Hyperlink onprogress(String value)
      Description copied from class: HtmlElement
      onprogress attribute.

      Event handler for when the browser is downloading media data.

      Overrides:
      onprogress in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the progress event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onratechange

      public Hyperlink onratechange(String value)
      Description copied from class: HtmlElement
      onratechange attribute.

      Event handler for when the playback rate of media changes.

      Overrides:
      onratechange in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the ratechange event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onreset

      public Hyperlink onreset(String value)
      Description copied from class: HtmlElement
      onreset attribute.

      Event handler for when a form is reset.

      Overrides:
      onreset in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the reset event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onresize

      public Hyperlink onresize(String value)
      Description copied from class: HtmlElement
      onresize attribute.

      Event handler for when the element is resized.

      Overrides:
      onresize in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the resize event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onscroll

      public Hyperlink onscroll(String value)
      Description copied from class: HtmlElement
      onscroll attribute.

      Event handler for when the element's scrollbar is scrolled.

      Overrides:
      onscroll in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the scroll event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onseeked

      public Hyperlink onseeked(String value)
      Description copied from class: HtmlElement
      onseeked attribute.

      Event handler for when a seek operation completes.

      Overrides:
      onseeked in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the seeked event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onseeking

      public Hyperlink onseeking(String value)
      Description copied from class: HtmlElement
      onseeking attribute.

      Event handler for when a seek operation begins.

      Overrides:
      onseeking in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the seeking event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onselect

      public Hyperlink onselect(String value)
      Description copied from class: HtmlElement
      onselect attribute.

      Event handler for when text is selected in the element.

      Overrides:
      onselect in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the select event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onshow

      public Hyperlink onshow(String value)
      Description copied from class: HtmlElement
      onshow attribute.

      Event handler for when a context menu is shown.

      Overrides:
      onshow in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the show event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onstalled

      public Hyperlink onstalled(String value)
      Description copied from class: HtmlElement
      onstalled attribute.

      Event handler for when media loading is stalled.

      Overrides:
      onstalled in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the stalled event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onsubmit

      public Hyperlink onsubmit(String value)
      Description copied from class: HtmlElement
      onsubmit attribute.

      Event handler for when a form is submitted.

      Note:

      If your HTML serializer is configured to use single quotes for attribute values, you should use double quotes in your JavaScript code, and vice versa. Otherwise, the quotes will be converted to HTML entities. For example:

      • If using single quotes for attributes: onsubmit("return validate(\"form\")")
      • If using double quotes for attributes: onsubmit("return validate('form')")
      Overrides:
      onsubmit in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the submit event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onsuspend

      public Hyperlink onsuspend(String value)
      Description copied from class: HtmlElement
      onsuspend attribute.

      Event handler for when media loading is suspended.

      Overrides:
      onsuspend in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the suspend event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • ontimeupdate

      public Hyperlink ontimeupdate(String value)
      Description copied from class: HtmlElement
      ontimeupdate attribute.

      Event handler for when the current playback position changes.

      Overrides:
      ontimeupdate in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the timeupdate event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • ontoggle

      public Hyperlink ontoggle(String value)
      Description copied from class: HtmlElement
      ontoggle attribute.

      Event handler for when a details element is opened or closed.

      Overrides:
      ontoggle in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the toggle event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onvolumechange

      Description copied from class: HtmlElement
      onvolumechange attribute.

      Event handler for when the volume of media changes.

      Overrides:
      onvolumechange in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the volumechange event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • onwaiting

      public Hyperlink onwaiting(String value)
      Description copied from class: HtmlElement
      onwaiting attribute.

      Event handler for when media playback stops to buffer more data.

      Overrides:
      onwaiting in class HtmlElement<A>
      Parameters:
      value - JavaScript code to execute when the waiting event occurs. Can be null to unset the attribute.
      Returns:
      This object.
    • rel

      public Hyperlink rel(String value)
      Description copied from class: A
      rel attribute.

      Specifies the relationship between the current document and the linked resource.

      Common values:

      • "alternate" - Alternative version of the page
      • "author" - Link to the author of the page
      • "bookmark" - Permalink for bookmarking
      • "external" - External link
      • "help" - Link to help documentation
      • "license" - Link to license information
      • "next" - Next page in a sequence
      • "nofollow" - Don't follow this link for SEO
      • "noreferrer" - Don't send referrer information
      • "prev" - Previous page in a sequence
      • "search" - Link to search functionality
      • "tag" - Tag for the current page
      Overrides:
      rel in class A
      Parameters:
      value - The relationship between the document and linked resource. Can be null to unset the attribute.
      Returns:
      This object.
    • spellcheck

      public Hyperlink spellcheck(Object value)
      Description copied from class: HtmlElement
      spellcheck attribute.

      Indicates whether the element should have its spelling and grammar checked.

      Possible values:

      • "true" - Enable spell checking for this element
      • "false" - Disable spell checking for this element
      Overrides:
      spellcheck in class HtmlElement<A>
      Parameters:
      value - Whether spell checking should be enabled. Can be null to unset the attribute.
      Returns:
      This object.
    • style

      public Hyperlink style(String value)
      Description copied from class: HtmlElement
      style attribute.

      Specifies inline CSS styles for the element. The value should be valid CSS property-value pairs separated by semicolons.

      Overrides:
      style in class HtmlElement<A>
      Parameters:
      value - Inline CSS styles (e.g., "color: red; font-size: 14px;"). Can be null to unset the attribute.
      Returns:
      This object.
    • tabindex

      public Hyperlink tabindex(Object value)
      Description copied from class: HtmlElement
      tabindex attribute.

      Specifies the tab order of the element when navigating with the keyboard.

      Possible values:

      • Positive integer - Element is focusable and participates in tab order
      • "0" - Element is focusable but not in tab order
      • Negative integer - Element is not focusable
      Overrides:
      tabindex in class HtmlElement<A>
      Parameters:
      value - The tab order value for keyboard navigation. Can be null to unset the attribute.
      Returns:
      This object.
    • target

      public Hyperlink target(String value)
      Description copied from class: A
      target attribute.

      Specifies where to open the linked resource when the link is clicked.

      Common values:

      • "_blank" - Open in a new window/tab
      • "_self" - Open in the same frame (default)
      • "_parent" - Open in the parent frame
      • "_top" - Open in the full body of the window
      • "framename" - Open in a named frame
      Overrides:
      target in class A
      Parameters:
      value - Where to open the linked resource. Can be null to unset the attribute.
      Returns:
      This object.
    • title

      public Hyperlink title(String value)
      Description copied from class: HtmlElement
      title attribute.

      Specifies additional information about the element, typically displayed as a tooltip when the user hovers over the element.

      Overrides:
      title in class HtmlElement<A>
      Parameters:
      value - Tooltip text to display on hover (e.g., "Click to submit form"). Can be null to unset the attribute.
      Returns:
      This object.
    • translate

      public Hyperlink translate(Object value)
      Description copied from class: HtmlElement
      translate attribute.

      Specifies whether the element's content should be translated when the page is localized.

      Possible values:

      • "yes" - Content should be translated (default)
      • "no" - Content should not be translated
      Overrides:
      translate in class HtmlElement<A>
      Parameters:
      value - Whether the element content should be translated. Can be null to unset the attribute.
      Returns:
      This object.
    • type

      public Hyperlink type(String value)
      Description copied from class: A
      type attribute.

      Specifies the MIME type of the linked resource. Helps browsers determine how to handle the resource.

      Common values:

      • "text/html" - HTML document
      • "text/css" - CSS stylesheet
      • "application/pdf" - PDF document
      • "image/png" - PNG image
      • "application/zip" - ZIP archive
      Overrides:
      type in class A
      Parameters:
      value - The MIME type of the linked resource. Can be null to unset the attribute.
      Returns:
      This object.