Name
URL — Blob URL methods
Synopsis
The URL
property of the Window object refers to this URL object. In the
future, this object may become a constructor for a URL parsing and
manipulation utility class. At the time of this writing, however, it
simply serves as a namespace for the two Blob URL functions
described below. See Blobs and Blob URLs for more on Blobs and Blob URLs.
The URL object is new at the time of this writing and the API
is not yet stable. You may need to use it with a vendor-specific
prefix: webkitURL
, for
example.
Functions
string createObjectURL
(Blob
blob
)
createObjectURL
(Blob
blob
)Return a Blob URL for the specified
blob
. HTTP GET requests for that URL
will return the contents of
blob
.
void revokeObjectURL
(string
url
)
revokeObjectURL
(string
url
)Revoke the specified Blob url
, so
that it is no longer associated with any Blob and can no longer be
loaded.
Get JavaScript: The Definitive Guide, 6th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.