Interface HTMLElementDataMethods<E extends HTMLElement, B extends TypedBuilder<E,B>>

All Superinterfaces:
IsElement<E>, TypedBuilder<E,B>
All Known Implementing Classes:
HTMLContainerBuilder, HTMLElementBuilder, HTMLInputElementBuilder, HTMLSelectElementBuilder, HTMLTextAreaElementBuilder, Link

public interface HTMLElementDataMethods<E extends HTMLElement, B extends TypedBuilder<E,B>> extends TypedBuilder<E,B>, IsElement<E>
Provides methods and default implementations for modifying the data attributes of an HTML element.
  • Method Summary

    Modifier and Type
    Method
    Description
    default B
    data(String name)
    Adds a data- attribute to the element.
    default B
    data(String name, String value)
    Adds a data- attribute to the element.

    Methods inherited from interface IsElement

    element

    Methods inherited from interface TypedBuilder

    that
  • Method Details

    • data

      default B data(String name)
      Adds a data- attribute to the element.
      Parameters:
      name - The name of the data attributes w/o the data- prefix. However, it won't be added if it's already present.
    • data

      default B data(String name, String value)
      Adds a data- attribute to the element.
      Parameters:
      name - The name of the data attributes w/o the data- prefix. However, it won't be added if it's already present.
      value - The value of the data attribute.