URL-1
URL: {
(url, base?): URL;
prototype: URL;
canParse: boolean;
createObjectURL: string;
parse: URL | null;
revokeObjectURL: void;
};
Type Declaration
Parameters
| Parameter | Type |
|---|---|
url | string | URL |
base? | string | URL |
Returns
prototype
prototype: URL;
canParse()
canParse(url, base?): boolean;
The URL.canParse() static method of the URL interface returns a boolean indicating whether or not an absolute URL, or a relative URL combined with a base URL, are parsable and valid.
Parameters
| Parameter | Type |
|---|---|
url | string | URL |
base? | string | URL |
Returns
boolean
createObjectURL()
createObjectURL(obj): string;
The createObjectURL() static method of the URL interface creates a string containing a blob URL pointing to the object given in the parameter.
Parameters
| Parameter | Type |
|---|---|
obj | Blob | MediaSource |
Returns
string
parse()
parse(url, base?): URL | null;
The URL.parse() static method of the URL interface returns a newly created URL object representing the URL defined by the parameters.
Parameters
| Parameter | Type |
|---|---|
url | string | URL |
base? | string | URL |
Returns
URL | null
revokeObjectURL()
revokeObjectURL(url): void;
The revokeObjectURL() static method of the URL interface releases an existing object URL which was previously created by calling URL.createObjectURL().
Parameters
| Parameter | Type |
|---|---|
url | string |
Returns
void