Last updated

API / geotoolkit / css / LexicalUnit / LexicalUnit

Class: LexicalUnit

css.LexicalUnit.LexicalUnit

Defines css Lexical unit

Table of contents

Constructors
Methods

Contents

Constructors

new LexicalUnit(value, p)

new LexicalUnit(value?, p?)

Parameters

Name Type
Optional valuestring
Optional pLexicalUnit
Methods

getClassName

getClassName(): string

Returns

string


getDimensionUnitText

getDimensionUnitText(): string

Returns string representing dimension unit

Throws

Error if dimensions are not supported

Returns

string


getLexicalUnitType

getLexicalUnitType(type?): number

Gets an integer representing the type of CssLexeme

Parameters

Name Type Description
Optional typestringtype

Returns

number


getNextLexicalUnit

getNextLexicalUnit(): LexicalUnit

Gets the next lexical unit, if present, otherwise null

Returns

LexicalUnit


getNumberValue

getNumberValue(): number

Get number value

Returns

number


getPreviousLexicalUnit

getPreviousLexicalUnit(): LexicalUnit

Gets the previous lexical unit, if present, otherwise null

Returns

LexicalUnit


getStringValue

getStringValue(): string

Gets the string representation of value If the type is CSS_URI, the return value doesn't contain uri(....) or quotes. If the type is CSS_ATTR, the return value doesn't contain attr(....).

Returns

string


parseParameters

parseParameters(value, p?): LexicalUnit

Parses value passed into constructor

Parameters

Name Type Description
valuestringValue of the parameter
Optional pLexicalUnitPrevious lexical unit

Returns

LexicalUnit


getClassName

Static getClassName(): string

Returns

string