RequestDestination enum
The destination read-only
property of the Request interface
returns a string describing the type of content being requested.
The destination
is used by the user agent to, for example,
help determine which set of rules to follow for CORS purposes,
or how to navigate any complicated code paths that affect
how specific types of request get handled.
Values
- byDefault → const RequestDestination
-
The default value of
destination
is used for destinations that do not have their own value.navigator.sendBeacon()
,EventSource
,<a ping>
,<area ping>
,fetch()
,XMLHttpRequest
,WebSocket
,Cache
and more.const RequestDestination('')
- audio → const RequestDestination
-
The target is audio data.
const RequestDestination('audio')
- audioWorklet → const RequestDestination
-
The target is data being fetched for use by an audio worklet.
const RequestDestination('audioworklet')
- document → const RequestDestination
-
The target is a document (
HTML
orXML
).const RequestDestination('document')
- embed → const RequestDestination
-
The target is embedded content.
const RequestDestination('embed')
- font → const RequestDestination
-
The target is a font.
const RequestDestination('font')
- image → const RequestDestination
-
The target is an image.
const RequestDestination('image')
- manifest → const RequestDestination
-
The target is a manifest.
const RequestDestination('manifest')
- object → const RequestDestination
-
The target is an object.
const RequestDestination('object')
- paintWorklet → const RequestDestination
-
The target is a paint worklet.
const RequestDestination('paintworklet')
- report → const RequestDestination
-
The target is a report.
const RequestDestination('report')
- script → const RequestDestination
-
The target is a script.
const RequestDestination('script')
- serviceWorker → const RequestDestination
-
The target is a service worker.
const RequestDestination('serviceworker')
-
The target is a shared worker.
const RequestDestination('sharedworker')
- style → const RequestDestination
-
The target is a style
const RequestDestination('style')
- track → const RequestDestination
-
The target is an HTML
<track>
.const RequestDestination('track')
- video → const RequestDestination
-
The target is video data.
const RequestDestination('video')
- worker → const RequestDestination
-
The target is a worker.
const RequestDestination('worker')
- xslt → const RequestDestination
-
The target is an
XSLT
transform.const RequestDestination('xslt')
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → String
-
A string which indicates the type of content the request is asking for.
This type is much broader than the usual document type values
(such as
"document"
or"manifest"
), and may include contextual cues such as"image"
or"worker"
or"audioworklet"
.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
RequestDestination> - A constant List of the values in this enum, in order of their declaration.