Packages

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

Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. URL
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. 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.

  2. 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.

  3. 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

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  10. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  11. def hash: String

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

  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  13. def host: String

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

  14. def href: String

    Is a DOMString containing the whole URL.

  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  20. def origin: String

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

  21. def password: String

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

  22. def pathname: String

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

  23. def port: String

    Is a DOMString containing the port number of the URL.

  24. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  25. def protocol: String

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

  26. def search: String

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

  27. 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

  28. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  29. def toLocaleString(): String
    Definition Classes
    Object
  30. def toString(): String
    Definition Classes
    AnyRef → Any
  31. def username: String

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

  32. def valueOf(): Any
    Definition Classes
    Object
  33. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped