Skip to content

API reference / Common / ExtensionDocumentOpenRequest

Interface: ExtensionDocumentOpenRequest ​

What open was given, as an ExtensionDocument is asked about it.

Properties ​

PropertyDescription
readonly source
string | Uint8Array<ArrayBufferLike> | URL | Blob
The source, as open was given it.
readonly options
OpenOptions
The options, as open was given them.
readonly url
string | undefined
A URL source, absolute; undefined for a Blob or bytes.
readonly name
string | undefined
The file's name: the filename option, else a File's own or a URL's last path segment; undefined where none is known.

Methods ​

ts
head(): Promise<{
  bytes: Uint8Array;
  mediaType: string | undefined;
}>;

The source's first bytes, at most 4 KiB, and the media type the Blob or the response declares (undefined where neither does). Read once, whoever asks first; when the engine opens the source, it reads on from there, so a URL is fetched once.