Global

Members

appendChild :string

Source:
Type:
  • string

insertBefore :string

Source:
Type:
  • string

removeElement :string

Source:
Type:
  • string

replaceElement :string

Source:
Type:
  • string

updateElement :string

Source:
Type:
  • string

wrapElement :string

Source:
Type:
  • string

clearListeners :string

Source:
Type:
  • string

Methods

model(model)

Source:

Load a model

Parameters:
Name Type Description
model object
Properties
Name Type Attributes Description
name string

The name of the model

method string

One of the following methods name: appendChild, insertBefore, removeElement, updateElement, replaceElement, wrapElement, clearListeners

properties Object

Processed properties along with any properties an ElementĀ¹ can have

callback function <optional>

Callback of processed properties along with any properties an ElementĀ¹ can have

properties.children Array.<Object> <optional>

An array of the "properties" object

bind(name, callback)

Source:

Link a model to a "binding", that is a callback function

Parameters:
Name Type Description
name string

The name of the model

callback function

The function binding the model

runModel(name, parameters)

Source:

Update the DOM accordingly to a model

Parameters:
Name Type Description
name string

The name of the model

parameters Object

The parameters of the model

Properties
Name Type Attributes Description
data Object <optional>

The data that will be echoed on the model

parentNode Element

The target Node

bindingArgs Array <optional>

The arguments that go along with the binding

createElement(properties, callbackopt) → {Element}

Source:

Transform a model into an Element

Parameters:
Name Type Attributes Description
properties object

Processed properties along with any properties a Element can have

callback function <optional>

Callback version of properties

Returns:

An array of ElementsĀ¹

Type
Element

getModelProperties(name, dataopt) → {Object}

Source:

Returns the properties of a model

Parameters:
Name Type Attributes Description
name string

The name of the model

data Object <optional>

The data that will be echoed on the model

Returns:

The "properties" object of the model

Type
Object

listen(context, title, callback)

Source:

Load a listener

Parameters:
Name Type Description
context *

Where the announce will be broadcasted

title string

The content of the message

callback function

removeListener(listener)

Source:

Remove a listener

Parameters:
Name Type Description
listener Object

announce(context, title, content)

Source:

Message one or many listeners

Parameters:
Name Type Description
context *

Where the announce will be broadcasted

title string

The title of the announce

content *

The content of the announce