Enum Class WebShareSupport
- All Implemented Interfaces:
Serializable,Comparable<WebShareSupport>,Constable
Whether the browser exposes the Web Share API (
navigator.share).
Held by WebShare.supportSignal(). Reading the value does not show any
browser dialog ? it reports whether a subsequent share action would be able to invoke the native share sheet, or whether the
call would silently no-op because the API is missing in the current browser
context.
Typical usage:
SUPPORTED? show a "Share" button that triggers a share action.UNSUPPORTED? fall back to a copy-link or social-network affordance; the native sheet is unavailable in this browser.UNKNOWN? only seen in the brief window before the first bootstrap handshake completes; treat the same asUNSUPPORTEDuntil a real value arrives.
- Since:
- 25.2
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe browser exposesnavigator.share; share actions bound to a user gesture will invoke the native share sheet.No value has been reported by the browser yet.The browser does not exposenavigator.share; share actions silently reject. -
Method Summary
Modifier and TypeMethodDescriptionstatic WebShareSupportReturns the enum constant of this class with the specified name.static WebShareSupport[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
No value has been reported by the browser yet. Used only as the initial value of the signal before the first client handshake delivers the real one. In normal request handling the signal is seeded before any user code (UI initialization,UIInitListener, component attach) runs, so this value is essentially never observed in practice; once a real value has arrived, the signal never returns toUNKNOWN. -
SUPPORTED
The browser exposesnavigator.share; share actions bound to a user gesture will invoke the native share sheet. -
UNSUPPORTED
The browser does not exposenavigator.share; share actions silently reject. Most desktop Firefox builds and older browsers fall in this bucket.
-
-
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
-