GitHub

MutableUrl

API reference for MutableUrl.

A copy of a Url whose attributes can be set, as a JavaScript URL's can (mutate hands one out). Setting href to text that is not a URL raises ValueError, as URL throws.

Attributes

AttributeTypeDescription
recordUrlRecord = url.record
hrefstr
protocolstr
usernamestr
passwordstr
hoststr
hostnamestr
portstr
pathnamestr
searchstr
hashstr
originstr

Functions

__init__

__init__(url) -> None
ParameterTypeDescription
urlUrl
def __init__(self, url: Url) -> None:
    self.record: UrlRecord = url.record

freeze

freeze() -> Url

Returns Url

def freeze(self) -> Url:
    return Url.from_record(self.record)