API reference / Common / ExtensionDocumentOpenRequest
Interface: ExtensionDocumentOpenRequest
What open was given, as an ExtensionDocument is asked about it.
Properties
| Property | Description |
|---|---|
readonly sourcestring | Uint8Array<ArrayBufferLike> | URL | Blob | The source, as open was given it. |
readonly optionsOpenOptions | The options, as open was given them. |
readonly urlstring | undefined | A URL source, absolute; undefined for a Blob or bytes. |
readonly namestring | 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
head()
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.