ruby<L, V> function

DomElement<L, V> ruby<L, V>({
  1. String? key,
  2. List<String>? classes,
  3. Map<String, String>? attributes,
  4. Map<String, String>? styles,
  5. String? accesskey,
  6. String? autocapitalize,
  7. String? contenteditable,
  8. String? dir,
  9. String? draggable,
  10. String? hidden,
  11. String? id,
  12. String? itemprop,
  13. String? lang,
  14. String? role,
  15. String? slot,
  16. String? spellcheck,
  17. String? tabindex,
  18. String? title,
  19. String? translate,
  20. Map<String, DomEventFn<L, V>>? events,
  21. DomLifecycleEventFn<L>? onCreate,
  22. DomLifecycleEventFn<L>? onUpdate,
  23. DomLifecycleEventFn<L>? onRemove,
  24. Iterable<DomNode<L, V>>? children,
  25. DomNode<L, V>? child,
  26. String? text,
})

Represents small annotations that are rendered above, below, or next to base text, usually used for showing the pronunciation of East Asian characters. It can also be used for annotating other kinds of text, but this usage is less common.

Implementation

DomElement<L, V> ruby<L, V>({
  String? key,
  List<String>? classes,
  Map<String, String>? attributes,
  Map<String, String>? styles,

  /// Keyboard shortcut to activate or add focus to the element.
  String? accesskey,

  /// Sets whether input is automatically capitalized when entered by user
  String? autocapitalize,

  /// Indicates whether the element's content is editable.
  String? contenteditable,

  /// Defines the text direction. Allowed values are ltr (Left-To-Right) or
  /// rtl (Right-To-Left)
  String? dir,

  /// Defines whether the element can be dragged.
  String? draggable,

  /// Prevents rendering of given element, while keeping child elements, e.g.
  /// script elements, active.
  String? hidden,

  /// Often used with CSS to style a specific element. The value of this
  /// attribute must be unique.
  String? id,

  ///
  String? itemprop,

  /// Defines the language used in the element.
  String? lang,

  /// Defines an explicit role for an element for use by assistive technologies.
  String? role,

  /// Assigns a slot in a shadow DOM shadow tree to an element.
  String? slot,

  /// Indicates whether spell checking is allowed for the element.
  String? spellcheck,

  /// Overrides the browser's default tab order and follows the one specified
  /// instead.
  String? tabindex,

  /// Text to be displayed in a tooltip when hovering over the element.
  String? title,

  /// Specify whether an element's attribute values and the values of its
  /// Text node
  /// children are to be translated when the page is localized, or whether to
  /// leave them unchanged.
  String? translate,
  Map<String, DomEventFn<L, V>>? events,
  DomLifecycleEventFn<L>? onCreate,
  DomLifecycleEventFn<L>? onUpdate,
  DomLifecycleEventFn<L>? onRemove,
  Iterable<DomNode<L, V>>? children,
  DomNode<L, V>? child,
  String? text,
}) {
  return DomElement<L, V>(
    'ruby',
    key: key,
    classes: classes,
    attributes: <String, String>{
      if (accesskey != null) 'accesskey': accesskey,
      if (autocapitalize != null) 'autocapitalize': autocapitalize,
      if (contenteditable != null) 'contenteditable': contenteditable,
      if (dir != null) 'dir': dir,
      if (draggable != null) 'draggable': draggable,
      if (hidden != null) 'hidden': hidden,
      if (id != null) 'id': id,
      if (itemprop != null) 'itemprop': itemprop,
      if (lang != null) 'lang': lang,
      if (role != null) 'role': role,
      if (slot != null) 'slot': slot,
      if (spellcheck != null) 'spellcheck': spellcheck,
      if (tabindex != null) 'tabindex': tabindex,
      if (title != null) 'title': title,
      if (translate != null) 'translate': translate,
      ...?attributes,
    },
    styles: styles,
    events: events,
    onCreate: onCreate,
    onUpdate: onUpdate,
    onRemove: onRemove,
    children: children,
    child: child,
    text: text,
  );
}