link<L, V> function

DomElement<L, V> link<L, V>({
  1. String? key,
  2. List<String>? classes,
  3. Map<String, String>? attributes,
  4. Map<String, String>? styles,
  5. String? accesskey,
  6. String? as,
  7. String? autocapitalize,
  8. String? contenteditable,
  9. String? crossorigin,
  10. String? dir,
  11. String? draggable,
  12. String? hidden,
  13. String? href,
  14. String? hreflang,
  15. String? id,
  16. String? integrity,
  17. String? itemprop,
  18. String? lang,
  19. String? media,
  20. String? referrerpolicy,
  21. String? rel,
  22. String? role,
  23. String? sizes,
  24. String? slot,
  25. String? spellcheck,
  26. String? tabindex,
  27. String? title,
  28. String? translate,
  29. String? type,
  30. Map<String, DomEventFn<L, V>>? events,
  31. DomLifecycleEventFn<L>? onCreate,
  32. DomLifecycleEventFn<L>? onUpdate,
  33. DomLifecycleEventFn<L>? onRemove,
  34. Iterable<DomNode<L, V>>? children,
  35. DomNode<L, V>? child,
  36. String? text,
})

Specifies relationships between the current document and an external resource. This element is most commonly used to link to CSS but is also used to establish site icons (both "favicon" style icons and icons for the home screen and apps on mobile devices) among other things.

Implementation

DomElement<L, V> link<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,

  /// Specifies the type of content being loaded by the link.
  String? as,

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

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

  /// How the element handles cross-origin requests
  String? crossorigin,

  /// 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,

  /// The URL of a linked resource.
  String? href,

  /// Specifies the language of the linked resource.
  String? hreflang,

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

  /// Specifies a
  /// Subresource Integrity
  /// value that allows browsers to verify what they fetch.
  String? integrity,

  ///
  String? itemprop,

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

  /// Specifies a hint of the media for which the linked resource was
  /// designed.
  String? media,

  /// Specifies which referrer is sent when fetching the resource.
  String? referrerpolicy,

  /// Specifies the relationship of the target object to the link object.
  String? rel,

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

  ///
  String? sizes,

  /// 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,

  /// Defines the type of the element.
  String? type,
  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>(
    'link',
    key: key,
    classes: classes,
    attributes: <String, String>{
      if (accesskey != null) 'accesskey': accesskey,
      if (as != null) 'as': as,
      if (autocapitalize != null) 'autocapitalize': autocapitalize,
      if (contenteditable != null) 'contenteditable': contenteditable,
      if (crossorigin != null) 'crossorigin': crossorigin,
      if (dir != null) 'dir': dir,
      if (draggable != null) 'draggable': draggable,
      if (hidden != null) 'hidden': hidden,
      if (href != null) 'href': href,
      if (hreflang != null) 'hreflang': hreflang,
      if (id != null) 'id': id,
      if (integrity != null) 'integrity': integrity,
      if (itemprop != null) 'itemprop': itemprop,
      if (lang != null) 'lang': lang,
      if (media != null) 'media': media,
      if (referrerpolicy != null) 'referrerpolicy': referrerpolicy,
      if (rel != null) 'rel': rel,
      if (role != null) 'role': role,
      if (sizes != null) 'sizes': sizes,
      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,
      if (type != null) 'type': type,
      ...?attributes,
    },
    styles: styles,
    events: events,
    onCreate: onCreate,
    onUpdate: onUpdate,
    onRemove: onRemove,
    children: children,
    child: child,
    text: text,
  );
}