protocol property

String protocol

Implementation

String get protocol => _DOMString(_resolvedHyperlink?.scheme) + ':';
void protocol=(String value)

Implementation

set protocol(String value) {
  if (_resolvedHyperlink == null) return;

  if (!value.endsWith(':')) {
    value += ':';
    internalSetAttribute('protocol', value);
  }

  // Remove the ending `:`
  String scheme = value.substring(0, value.length - 1);
  _resolvedHyperlink = _resolvedHyperlink!.replace(scheme: scheme);
  _reflectToAttributeHref();
}