Content
State
Prev
Input
Content
State
Changed
Callback
Content
State
Property
Mode
Name
content
State
logger
on
Changed
Listeners
add
Content
State
Changed
Listener
Index
Classes
Content
State
Prev
Input
Type aliases
Content
State
Changed
Callback
Content
State
Property
Mode
Name
Variables
content
State
logger
on
Changed
Listeners
Functions
add
Content
State
Changed
Listener
Type aliases
Content
State
Changed
Callback
Content
State
Changed
Callback
:
(
property
:
ContentStateProperty
, oldValue
:
any
, newValue
:
any
, suffix
:
any
)
=>
void
Type declaration
(
property
:
ContentStateProperty
, oldValue
:
any
, newValue
:
any
, suffix
:
any
)
:
void
Parameters
property:
ContentStateProperty
oldValue:
any
newValue:
any
suffix:
any
Returns
void
Content
State
Property
Content
State
Property
:
"mode"
|
"cmdHistory"
|
"prevInputs"
|
"suffix"
|
"group"
Mode
Name
Mode
Name
:
"normal"
|
"insert"
|
"hint"
|
"ignore"
|
"gobble"
|
"input"
|
"visual"
|
"nmode"
Variables
Const
content
State
content
State
:
ContentState
= (new Proxy({ mode: "normal" },{get(target, property: ContentStateProperty) {return target[property]},set(target, property: ContentStateProperty, newValue) {logger.debug("Content state changed!", property, newValue)const oldValue = target[property]const mode = target.modetarget[property] = newValuefor (const listener of onChangedListeners) {listener(property, mode, oldValue, newValue)}return true},},) as any) as ContentState
Const
logger
logger
:
Logger
= new Logger("state")
Const
on
Changed
Listeners
on
Changed
Listeners
:
ContentStateChangedCallback
[]
= []
Functions
add
Content
State
Changed
Listener
add
Content
State
Changed
Listener
(
callback
:
ContentStateChangedCallback
)
:
void
Parameters
callback:
ContentStateChangedCallback
Returns
void