- All Implemented Interfaces:
Serializable,Comparable<WebRequest.FetchDestination>,Constable
- Enclosing class:
- WebRequest
The destination of a request, as defined by the Fetch spec
(
https://fetch.spec.whatwg.org/#concept-request-destination).
This is used to compute the value of the Sec-Fetch-Dest request
header (see
https://www.w3.org/TR/fetch-metadata/) and also determines the default
WebRequest.FetchMode to be used, unless explicitly overridden via
WebRequest.setFetchModeOverride(FetchMode).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAn<audio>resource.A top-level document, e.g. loaded by the address bar, a link, or a form submission.An<embed>element.No specific destination, e.g.A font resource, e.g. loaded via@font-face.A nested browsing context of type<frame>.A nested browsing context of type<iframe>.An image, e.g.A web app manifest, e.g.An<object>element.A reporting endpoint request.A classic or module script, e.g.A service worker script.A shared worker script.A stylesheet, e.g.A<track>resource.A<video>resource.A WebSocket handshake request.A dedicated worker script. -
Method Summary
Modifier and TypeMethodDescriptiongetValue()Returns the value to be used for theSec-Fetch-Destheader.static WebRequest.FetchDestinationReturns the enum constant of this class with the specified name.static WebRequest.FetchDestination[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DOCUMENT
A top-level document, e.g. loaded by the address bar, a link, or a form submission. -
IFRAME
A nested browsing context of type<iframe>. -
FRAME
A nested browsing context of type<frame>. -
OBJECT
An<object>element. -
EMBED
An<embed>element. -
IMAGE
An image, e.g.<img>, a CSS background-image, or a favicon. -
SCRIPT
A classic or module script, e.g.<script src>. -
STYLE
A stylesheet, e.g.<link rel=stylesheet>or a CSS@import. -
FONT
A font resource, e.g. loaded via@font-face. -
AUDIO
An<audio>resource. -
VIDEO
A<video>resource. -
TRACK
A<track>resource. -
WORKER
A dedicated worker script. -
SHARED_WORKER
A shared worker script. -
SERVICE_WORKER
A service worker script. -
MANIFEST
A web app manifest, e.g.<link rel=manifest>. -
REPORT
A reporting endpoint request. -
WEBSOCKET
A WebSocket handshake request. -
EMPTY
No specific destination, e.g.XMLHttpRequestorfetch().
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
Returns the value to be used for theSec-Fetch-Destheader.- Returns:
- the value to be used for the
Sec-Fetch-Destheader
-