classURLclass URLThe URL interface represents an object providing static methods used for creating object URLs.MDN Referencehash: stringMDN Referencehost: stringMDN Referencehostname: stringMDN Referencehref: stringMDN Referencereadonly origin: stringMDN Referencepassword: stringMDN Referencepathname: stringMDN Referenceport: stringMDN Referenceprotocol: stringMDN Referencesearch: stringMDN Referencereadonly searchParams: URLSearchParamsMDN Referenceusername: stringMDN ReferencetoJSON(): string;MDN ReferencetoString(): string;The toString() method on the URL object returns the serialized URL. The value returned is equivalent to that of href and toJSON.static canParse(url: string | URL,base?: string | URL): boolean;MDN Referencestatic createObjectURL(obj: Blob | MediaSource): string;MDN Referencestatic parse(url: string | URL,base?: string | URL): null | URL;MDN Referencestatic revokeObjectURL(url: string): void;MDN Reference
The URL interface represents an object providing static methods used for creating object URLs.MDN Reference
The toString() method on the URL object returns the serialized URL. The value returned is equivalent to that of href and toJSON.