C
MaskModel
testedThe stateful masking model. Holds the masked value/selection and performs
insertions/deletions in unmasked space (fixed characters stripped) before
re-calibrating to the masked form — the device that makes backspacing across
fixed characters and overwriteMode correct.
Signature
ts
class MaskModel implements ElementStateProperties
| Property | Type | Description |
|---|---|---|
value | string | — |
selection | SelectionRange | — |
Methods
addCharactersInsert characters at the current selection. Throws MASK_NOOP when
the result is identical to the current state.
ts
public addCharacters(characters: string): void| Parameter | Type | Description |
|---|---|---|
characters | string | — |
deleteCharactersDelete from the current selection. A collapsed caret removes one unmasked character in the given direction (auto-skipping fixed characters); a range removes its unmasked span.
ts
public deleteCharacters(isForward: boolean): void| Parameter | Type | Description |
|---|---|---|
isForward | boolean | — |