Enum Class CrossOrigin

java.lang.Object
java.lang.Enum<CrossOrigin>
com.oorian.html.elements.consts.CrossOrigin
All Implemented Interfaces:
Serializable, Comparable<CrossOrigin>, Constable

public enum CrossOrigin extends Enum<CrossOrigin>
Enumeration defining CORS (Cross-Origin Resource Sharing) modes for media and script elements. This enum provides type-safe constants for the "crossorigin" attribute, which configures how cross-origin requests are handled.
Since:
1.0
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Enum Constant Details

    • ANONYMOUS

      public static final CrossOrigin ANONYMOUS
      Anonymous CORS mode - sends cross-origin requests without credentials. No cookies, client-side certificates, or HTTP authentication are sent.
    • USE_CREDENTIALS

      public static final CrossOrigin USE_CREDENTIALS
      Credentialed CORS mode - sends cross-origin requests with credentials. Includes cookies, client-side certificates, and HTTP authentication. Requires the server to explicitly allow credentials via CORS headers.
  • Method Details

    • values

      public static CrossOrigin[] 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

      public static CrossOrigin valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
      Gets the CORS mode value for use in crossorigin attribute.
      Returns:
      the string value used in HTML crossorigin attribute.
    • toString

      public String toString()
      Overrides:
      toString in class Enum<CrossOrigin>