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#
| Attribute | Type | Description |
|---|---|---|
record | UrlRecord = url.record | |
href | str | |
protocol | str | |
username | str | |
password | str | |
host | str | |
hostname | str | |
port | str | |
pathname | str | |
search | str | |
hash | str | |
origin | str |
Functions#
__init__#
__init__(url) -> None| Parameter | Type | Description |
|---|---|---|
url | Url |
def __init__(self, url: Url) -> None:
self.record: UrlRecord = url.recordfreeze#
freeze() -> UrlReturns Url
def freeze(self) -> Url:
return Url.from_record(self.record)