MVC Framework | Class System | Model
{ content, schema, localStorage }
Type: object
, array
, Schema
, undefined
Default: undefined
Required: false
Descript:
Default: undefined
Required: true
Type: object
, array
, Content
Descript:
Content
Settings.- Required to instantiate model, otherwise
constructor
returnsnull
.
Type: string
, undefined
Default: undefined
Required: false
Descript:
{ schema, content, enableEvents, localStorage, autoLoad }
Type: object
, array
, undefined
Default: undefined
Required: false
Descript:
Type: object
, array
, undefined
Default: undefined
Required: false
Descript:
Type: boolean
Default: false
Required: false
Descript:
- Specifies
content
property instantiated withlocalStorage
item.
Type: boolean
Default: false
Required: false
Descript:
- Specifies
content
saved tolocalStorage
after each content property modifier event.
Type: Boolean
Default: false
Required: false
Descript:
- Specifies
content
property modifier events (ChangeEvents
) captured
- When
settings.content
isnull
orundefined
andsettings.content
is not type ofobject
, returnnull
.
Type: get
Return: #_schema
Descript:
- When
settings.schema
isundefined
thenschema
assignednull
. - When
settings.schema
is instance ofSchema
then#_schema
assignedsettings.schema
. - When
settings.schema
is type ofobject
then#_schema
assigned newSchema
instance withsettings.schema
andoptions.schema
.
Type: get
Return: #_content
Descript:
- When
settings.localStorage
andoptions.autoLoad
aretrue
, newContent
instance constructed withlocalStorage.get
invocation (locally stored model content).
Type: get
Return: #_localStorage
Descript:
Type: get
, set
Inturn: $changeEvents
Return: #_changeEvents
Descript:
- When
$changeEvents
differs from#_changeEvents
the new value is assigned.- When
$changeEvents
istrue
an event listener is added tocontent
for eachChangeEvents
type. - When
$changeEvents
isfalase
an event listener is removed fromcontent
for eachChangeEvents
type.
- When
Type: function
Return: object
Descript:
- When
localStorage
is defined, evokelocalStorage.set
withcontent.object
.
Type: function
Return: object
Descript:
- When
localStorage
is defined, invokelocalStorage.get
.
Type: function
Return: undefined
Descript:
- When
localStorage
is defined, evokelocalStorage.remove
.
Type: function
Descript:
Type: Schema
, null
Type: Content
, null
Type: LocalStorage
Type: Boolean