Namespace: states

Drupal.states

The base States namespace.

Having the local states variable allows us to use the States namespace without having to always declare "Drupal.states".

Source:

Classes

Dependent
State
Trigger

Methods

(inner) compare(a, b) → {bool}

Compares two values while ignoring undefined values.

Parameters:
Name Type Description
a *

Value a.

b *

Value b.

Source:
Returns:

The comparison result.

Type
bool

(inner) invert(a, invertState) → {bool}

Inverts a (if it's not undefined) when invertState is true.

Parameters:
Name Type Description
a *

The value to maybe invert.

invertState bool

Whether to invert state or not.

Source:
Returns:

The result.

Type
bool

(inner) ternary(a, b) → {bool}

Bitwise AND with a third undefined state.

Parameters:
Name Type Description
a *

Value a.

b *

Value b

Source:
Returns:

The result.

Type
bool