- All Known Implementing Classes:
ValueFactory
public interface CSSValueFactory
Factory of CSS values.
-
Method Summary
Modifier and TypeMethodDescriptionCreates a primitive value according to the given lexical value.createCSSValue
(LexicalUnit lunit) Create an object-model value.
-
Method Details
-
createCSSValue
Create an object-model value.- Parameters:
lunit
- the lexical unit.- Returns:
- the object-model value.
-
createCSSPrimitiveValue
Creates a primitive value according to the given lexical value.This method won't return a ratio value (callers must check for values spanning more than one lexical unit).
The behavior when the lexical unit is an operator is implementation-dependent, but operators that aren't parameters nor sub-values, unless in
content
context, should throw exceptions.- Parameters:
lunit
- the lexical value.- Returns:
- the primitive value.
- Throws:
DOMException
- if the lexical unit does not represent a valid primitive.
-