public interface MediaQueryHandler
Interface to be implemented by handlers that are passed to
CSSParser.parseMediaQuery(String, MediaConditionFactory, MediaQueryHandler)
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
compatQuery
(CSSParseException exception) Reports that the current media query is invalid but probably compatible with a legacy browser.void
condition
(BooleanCondition condition) If the current query contains a media (feature) condition, set it.void
endQuery()
The current query ends.void
invalidQuery
(CSSParseException queryError) Reports that the current media query is invalid.void
A media type was found (e.g.void
Reports that the current query is a negative query.void
The current query uses theonly
prefix.void
A new media query starts being processed.
-
Method Details
-
startQuery
void startQuery()A new media query starts being processed. -
mediaType
A media type was found (e.g.screen
) in the current query.- Parameters:
mediaType
- the media type.
-
negativeQuery
void negativeQuery()Reports that the current query is a negative query. -
onlyPrefix
void onlyPrefix()The current query uses theonly
prefix. -
condition
If the current query contains a media (feature) condition, set it.- Parameters:
condition
- the media condition, which contains one or more media feature predicates and an initial media type predicate.
-
endQuery
void endQuery()The current query ends. -
invalidQuery
Reports that the current media query is invalid.- Parameters:
queryError
- the exception describing the error.
-
compatQuery
Reports that the current media query is invalid but probably compatible with a legacy browser.- Parameters:
exception
- the exception describing the location where the issue was found.
-