Interface CSSValueFactory

All Known Implementing Classes:
ValueFactory

public interface CSSValueFactory
Factory of CSS values.
  • Method Details

    • createCSSValue

      CSSValue createCSSValue(LexicalUnit lunit)
      Create an object-model value.
      Parameters:
      lunit - the lexical unit.
      Returns:
      the object-model value.
    • createCSSPrimitiveValue

      CSSPrimitiveValue createCSSPrimitiveValue(LexicalUnit lunit) throws DOMException
      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.