java.lang.Object
org.htmlunit.csp.Directive
org.htmlunit.csp.directive.PluginTypesDirective
Represents the (deprecated)
plugin-types CSP directive.
The plugin-types directive restricts the set of plugins that can be
embedded via <object>, <embed>, or <applet> by
specifying an allow-list of media types. Note that this directive has been
deprecated and is no longer supported by most browsers.
- Author:
- Salvation Team
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.htmlunit.csp.Directive
Directive.DirectiveErrorConsumer -
Field Summary
Fields inherited from class org.htmlunit.csp.Directive
IS_DIRECTIVE_NAME -
Constructor Summary
ConstructorsConstructorDescriptionPluginTypesDirective(List<String> values, Directive.DirectiveErrorConsumer errors) Parses aplugin-typesdirective from the given list of media-type values. -
Method Summary
Modifier and TypeMethodDescriptionReturns an unmodifiable list of the media types allowed by this directive.Methods inherited from class org.htmlunit.csp.Directive
addValue, containsNonDirectiveCharacter, getValues, removeValueIgnoreCase
-
Constructor Details
-
PluginTypesDirective
Parses aplugin-typesdirective from the given list of media-type values.Each token is parsed as a media type (
type/subtype). Invalid tokens and duplicates are reported through the suppliederrorsconsumer. Note that empty lists are allowed per w3c/webappsec-csp#374.- Parameters:
values- the raw string values for this directiveerrors- consumer that receives parsing errors and warnings
-
-
Method Details
-
getMediaTypes
Returns an unmodifiable list of the media types allowed by this directive.- Returns:
- the list of parsed
MediaTypevalues
-