host property

String get host

Implementation

String get host {
  String? host;
  Uri? resolved = _resolvedHyperlink;
  if (resolved != null) {
    host = resolved.host + ':' + (resolved.hasPort ? resolved.port.toString() : '');
  }
  return _DOMString(host);
}
set host (String value)

Implementation

set host(String value) {
  if (_resolvedHyperlink == null) return;
  String host = value;
  String port = this.port;

  // If input host including port.
  if (value.contains(':')) {
    List<String> split = value.split(':');
    host = split[0];
    port = split[1];
  }

  _resolvedHyperlink = _resolvedHyperlink!.replace(host: host, port: int.parse(port));
  _reflectToAttributeHref();
}