class URL extends Object
The URL interface represent an object providing static methods used for creating object URLs.
When using a user agent where no constructor has been implemented yet, it is possible to access such an object using the Window.URL properties (prefixed with Webkit-based browser as Window.webkitURL).
- Annotations
- @RawJSType() @native()
- See also
https://developer.mozilla.org/en-US/docs/Web/API/URL
- Alphabetic
- By Inheritance
- URL
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
URL(urlString: String, baseURLObject: URL)
The URL interface represent an object providing static methods used for creating object URLs.
The URL interface represent an object providing static methods used for creating object URLs.
When using a user agent where no constructor has been implemented yet, it is possible to access such an object using the Window.URL properties (prefixed with Webkit-based browser as Window.webkitURL).
- urlString
Is a DOMString representing an absolute or relative URL. If urlString is a relative URL, baseURLString or baseURLObject, whichever is present, will be used as the base URL. If urlString is an absolute URL, baseURLstring and baseURLobject are ignored.
- baseURLObject
Is a URL object representing the base URL to use in case urlString is a relative URL.
-
new
URL(urlString: String)
The URL interface represent an object providing static methods used for creating object URLs.
The URL interface represent an object providing static methods used for creating object URLs.
When using a user agent where no constructor has been implemented yet, it is possible to access such an object using the Window.URL properties (prefixed with Webkit-based browser as Window.webkitURL).
- urlString
Is a DOMString representing an absolute or relative URL. If urlString is a relative URL, baseURLString or baseURLObject, whichever is present, will be used as the base URL. If urlString is an absolute URL, baseURLstring and baseURLobject are ignored.
-
new
URL(urlString: String, baseURLString: String)
- urlString
Is a DOMString representing an absolute or relative URL. If urlString is a relative URL, baseURLstring or baseURLobject, whichever is present, will be used as the base URL. If urlString is an absolute URL, baseURLstring and baseURLobject are ignored.
- baseURLString
Is a DOMString representing the base URL to use in case urlString is a relative URL. If not specified, and no baseURLobject is passed in parameters, it default to 'about:blank'. If it is an invalid absolute URL, the constructor will raise a DOMException of type SYNTAX_ERROR
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
-
def
hash: String
Is a DOMString containing a '#' followed by the fragment identifier of the URL.
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
host: String
Is a DOMString containing the host, that is the hostname, a ':', and the port of the URL.
-
def
href: String
Is a DOMString containing the whole URL.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
origin: String
Returns a DOMString containing the origin of the URL, that is its scheme, its domain and its port.
-
def
password: String
Is a DOMString containing the password specified before the domain name.
-
def
pathname: String
Is a DOMString containing an initial '/' followed by the path of the URL.
-
def
port: String
Is a DOMString containing the port number of the URL.
-
def
propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
-
def
protocol: String
Is a DOMString containing the protocol scheme of the URL, including the final ':'.
-
def
search: String
Is a DOMString containing a '?' followed by the parameters of the URL.
-
def
searchParams: URLSearchParams
Returns a URLSearchParams object allowing to access the GET query arguments contained in the URL.
Returns a URLSearchParams object allowing to access the GET query arguments contained in the URL.
- returns
a URLSearchParams object
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toLocaleString(): String
- Definition Classes
- Object
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
username: String
Is a DOMString containing the username specified before the domain name.
-
def
valueOf(): Any
- Definition Classes
- Object
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )