URL

@native @JSGlobal @JSType
class URL(url: String, base: String) extends Object

The URL() constructor returns a newly created URL object representing the URL defined by the parameters.

Companion:
object
class Object
trait Any
class Object
trait Matchable
class Any

Value members

Concrete methods

def origin: String

Returns a DOMString containing the origin of the URL, that is its scheme, its domain and its port.

Returns a DOMString containing the origin of the URL, that is its scheme, its domain and its port.

Inherited methods

def hasOwnProperty(v: String): Boolean
Inherited from:
Object
def isPrototypeOf(v: Object): Boolean
Inherited from:
Object
def propertyIsEnumerable(v: String): Boolean
Inherited from:
Object
def toLocaleString(): String
Inherited from:
Object
def valueOf(): Any
Inherited from:
Object

Concrete fields

var hash: String

Is a DOMString containing a '#' followed by the fragment identifier of the URL.

Is a DOMString containing a '#' followed by the fragment identifier of the URL.

var host: String

Is a DOMString containing the host, that is the hostname, a ':', and the port of the URL.

Is a DOMString containing the host, that is the hostname, a ':', and the port of the URL.

var hostname: String

Is a DOMString containing the domain of the URL.

Is a DOMString containing the domain of the URL.

var href: String

Is a DOMString containing the whole URL.

Is a DOMString containing the whole URL.

var password: String

Is a DOMString containing the password specified before the domain name.

Is a DOMString containing the password specified before the domain name.

var pathname: String

Is a DOMString containing an initial '/' followed by the path of the URL.

Is a DOMString containing an initial '/' followed by the path of the URL.

var port: String

Is a DOMString containing the port number of the URL.

Is a DOMString containing the port number of the URL.

var protocol: String

Is a DOMString containing the protocol scheme of the URL, including the final ':'.

Is a DOMString containing the protocol scheme of the URL, including the final ':'.

var search: String

Is a DOMString containing a '?' followed by the parameters of the URL.

Is a DOMString containing a '?' followed by the parameters of the URL.

var username: String

Is a DOMString containing the username specified before the domain name.

Is a DOMString containing the username specified before the domain name.