Class: Store

markus.elements.Store

Implementing localStorage for MarkusJS. Properties of this element are saved in localStorage

new markus.elements.Store ()

Example
store
  @level 1
  @lang ru
  @hero Atlant

Mixes In

Members

this.childList Array.<Element>

Childs list

this.element string readonly

Element name

this.id string readonly

Element id

this.mark markus.View

Root view class

this.parentElement Element

Parent node

this.presets markus.View

Presets list

this.props Array.<function()> readonly

Element properties from markus markup

this.tags Array.<string>

Element tags

this.ticks Array.<function()>

Аrray of functions called every tick

Methods

addTag (props)

Add tag to tags list and app mixin props

Name Type Description
props string

tagName

addTick (cb)

Add function to ticks array

Name Type Description
cb funciton

Every tick is called

get ()any

Get item from localStorage

Properties:
Name Type Description
name string

Item name

Returns:
Type Description
any Item value from localStorage

removeTag (props)

Remove tag from tags list and reuse mixins props

Name Type Description
props string

tagName

set ()

Get item to localStorage

Properties:
Name Type Description
name string

item name

val any

item value

setProps (props)

Set props to element

Name Type Description
props Object

Props object