discontinuedPackage js_bindings has been discontinued and replaced by typings.

Url class

The interface is used to parse, construct, normalize, and encode URLs. It works by providing properties which allow you to easily read and modify the components of a URL. You normally create a new object by specifying the URL as a string when calling its constructor, or by providing a relative URL and a base URL. You can then easily read the parsed components of the URL or make changes to the URL. If a browser doesn't yet support the URL() constructor, you can access a URL object using the Window interface's property. Be sure to check to see if any of your target browsers require this to be prefixed. Note: This feature is available in Web Workers

Available extensions
Annotations
  • @JS.new('URL')
  • @staticInterop

Constructors

Url(String url, [String? base])
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
host ↔ String

Available on Url, provided by the PropsUrl extension

getter/setter pair
hostname ↔ String

Available on Url, provided by the PropsUrl extension

getter/setter pair
href ↔ String

Available on Url, provided by the PropsUrl extension

getter/setter pair
mHash ↔ String

Available on Url, provided by the PropsUrl extension

getter/setter pair
origin → String

Available on Url, provided by the PropsUrl extension

no setter
password ↔ String

Available on Url, provided by the PropsUrl extension

getter/setter pair
pathname ↔ String

Available on Url, provided by the PropsUrl extension

getter/setter pair
port ↔ String

Available on Url, provided by the PropsUrl extension

getter/setter pair
protocol ↔ String

Available on Url, provided by the PropsUrl extension

getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Available on Url, provided by the PropsUrl extension

getter/setter pair
searchParams → URLSearchParams

Available on Url, provided by the PropsUrl extension

no setter
username ↔ String

Available on Url, provided by the PropsUrl extension

getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJSON() → String

Available on Url, provided by the PropsUrl extension

toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

createObjectURL(dynamic obj) → String
revokeObjectURL(String url) → void