Package org.htmlunit.cssparser.parser
Class CSSOMParser
java.lang.Object
org.htmlunit.cssparser.parser.CSSOMParser
- Author:
- Ronald Brill
-
Constructor Summary
ConstructorsConstructorDescriptionCreates new CSSOMParser.CSSOMParser(AbstractCSSParser parser) Creates new CSSOMParser. -
Method Summary
Modifier and TypeMethodDescriptionprotected CSSStyleSheetImplgetParentStyleSheet.parseMedia(String media) Parses a string into a MediaQueryList.parsePropertyValue(String propertyValue) Parses a input string into a CSSValue.Parses a string into a CSSRule.parseSelectors(String selectors) Parses a string into a CSSSelectorList.parseStyleDeclaration(String styleDecl) Parses a input string into a CSSOM style declaration.voidparseStyleDeclaration(CSSStyleDeclarationImpl sd, String styleDecl) Parses a input string into a CSSOM style declaration.parseStyleSheet(InputSource source, String href) Parses a SAC input source into a CSSOM style sheet.voidsetErrorHandler.voidsetParentStyleSheet(CSSStyleSheetImpl parentStyleSheet) setParentStyleSheet.
-
Constructor Details
-
CSSOMParser
Creates new CSSOMParser.- Parameters:
parser- the parser
-
CSSOMParser
public CSSOMParser()Creates new CSSOMParser.
-
-
Method Details
-
setErrorHandler
setErrorHandler.
- Parameters:
eh- the error handler to be used
-
parseStyleSheet
Parses a SAC input source into a CSSOM style sheet.- Parameters:
source- the SAC input sourcehref- the href- Returns:
- the CSSOM style sheet
- Throws:
IOException- if the underlying SAC parser throws an IOException
-
parseStyleDeclaration
Parses a input string into a CSSOM style declaration.- Parameters:
styleDecl- the input string- Returns:
- the CSSOM style declaration
- Throws:
IOException- if the underlying SAC parser throws an IOException
-
parseStyleDeclaration
Parses a input string into a CSSOM style declaration.- Parameters:
sd- the CSSOM style declarationstyleDecl- the input string- Throws:
IOException- if the underlying SAC parser throws an IOException
-
parsePropertyValue
Parses a input string into a CSSValue.- Parameters:
propertyValue- the input string- Returns:
- the css value
- Throws:
IOException- if the underlying SAC parser throws an IOException
-
parseRule
Parses a string into a CSSRule.- Parameters:
rule- the input string- Returns:
- the css rule
- Throws:
IOException- if the underlying SAC parser throws an IOException
-
parseSelectors
Parses a string into a CSSSelectorList.- Parameters:
selectors- the input string- Returns:
- the css selector list
- Throws:
IOException- if the underlying SAC parser throws an IOException
-
parseMedia
Parses a string into a MediaQueryList.- Parameters:
media- the input string- Returns:
- the css media query list
- Throws:
IOException- if the underlying SAC parser throws an IOException
-
setParentStyleSheet
setParentStyleSheet.
- Parameters:
parentStyleSheet- the new parent stylesheet
-
getParentStyleSheet
getParentStyleSheet.
- Returns:
- the parent style sheet
-