Skip to main content

Class: URL

Hierarchy

  • URL

    URL

Constructors

constructor

new URL(url, base?): URL

Parameters

NameType
urlstring | URL
base?string | URL

Returns

URL

Inherited from

URL.constructor

Defined in

node_modules/typescript/lib/lib.dom.d.ts:22564

Properties

hash

hash: string

MDN Reference

Inherited from

URL.hash

Defined in

node_modules/typescript/lib/lib.dom.d.ts:22534


host

host: string

MDN Reference

Inherited from

URL.host

Defined in

node_modules/typescript/lib/lib.dom.d.ts:22536


hostname

hostname: string

MDN Reference

Inherited from

URL.hostname

Defined in

node_modules/typescript/lib/lib.dom.d.ts:22538


href

href: string

MDN Reference

Inherited from

URL.href

Defined in

node_modules/typescript/lib/lib.dom.d.ts:22540


origin

Readonly origin: string

MDN Reference

Inherited from

URL.origin

Defined in

node_modules/typescript/lib/lib.dom.d.ts:22543


password

password: string

MDN Reference

Inherited from

URL.password

Defined in

node_modules/typescript/lib/lib.dom.d.ts:22545


pathname

pathname: string

MDN Reference

Inherited from

URL.pathname

Defined in

node_modules/typescript/lib/lib.dom.d.ts:22547


port

port: string

MDN Reference

Inherited from

URL.port

Defined in

node_modules/typescript/lib/lib.dom.d.ts:22549


protocol

protocol: string

MDN Reference

Inherited from

URL.protocol

Defined in

node_modules/typescript/lib/lib.dom.d.ts:22551


search: string

MDN Reference

Inherited from

URL.search

Defined in

node_modules/typescript/lib/lib.dom.d.ts:22553


searchParams

Readonly searchParams: URLSearchParams

MDN Reference

Inherited from

URL.searchParams

Defined in

node_modules/typescript/lib/lib.dom.d.ts:22555


username

username: string

MDN Reference

Inherited from

URL.username

Defined in

node_modules/typescript/lib/lib.dom.d.ts:22557

Methods

toJSON

toJSON(): string

MDN Reference

Returns

string

Inherited from

URL.toJSON

Defined in

node_modules/typescript/lib/lib.dom.d.ts:22559


toString

toString(): string

Returns

string

Inherited from

URL.toString

Defined in

node_modules/typescript/lib/lib.dom.d.ts:22541


canParse

canParse(str): boolean

Parameters

NameType
strstring

Returns

boolean

Overrides

URL.canParse

Defined in

packages/common/src/utils.ts:35


createObjectURL

createObjectURL(obj): string

MDN Reference

Parameters

NameType
objBlob | MediaSource

Returns

string

Inherited from

URL.createObjectURL

Defined in

node_modules/typescript/lib/lib.dom.d.ts:22568


revokeObjectURL

revokeObjectURL(url): void

MDN Reference

Parameters

NameType
urlstring

Returns

void

Inherited from

URL.revokeObjectURL

Defined in

node_modules/typescript/lib/lib.dom.d.ts:22570