Home Reference Source
public class | source

Item

Extends:

Core → Item

Direct Subclass:

List

Item. this can be an element of List.

Constructor Summary

Public Constructor
public

constructor(defaultData: object)

Constructor.

Member Summary

Public Members
public

[field]: *

Method Summary

Public Methods
public

add(field: string, value: Any)

Add value to field-value.

public

Destroy me.

public

toggle(field: string)

Toggle boolean field-value

public

update(pairs: Object)

Update the pairs of field-value.

Private Methods
private

_updateField(field: string, value: Any)

Update field with value.

Inherited Summary

From class Core
public

listened(nameOrObj: string | Object, handler: Function)

Add handler or listener for saying message

public

say(name: string, ctx: *)

Cast a message to the listeners

public

Unescape HTML

public

Remove handler or listener

private

_callR(args: *, target: *, method: *, methodOwner: *)

private

_isFn(f: *): *

private

_isStr(v: *): *

private

_listened(name: *, handler: *)

private

_privates(): {"_F_obs": *}

Return non-enumerable attribute definitions.

private

_say(targetName: *, name: *, ctx: *)

Public Constructors

public constructor(defaultData: object) source

Constructor.

Override:

Core#constructor

Params:

NameTypeAttributeDescription
defaultData object
  • optional

default data

Public Members

public [field]: * source

Public Methods

public add(field: string, value: Any) source

Add value to field-value.

Params:

NameTypeAttributeDescription
field string

adding field name

value Any

adding value

public destroy() source

Destroy me.

public toggle(field: string) source

Toggle boolean field-value

Params:

NameTypeAttributeDescription
field string

toggling field name

public update(pairs: Object) source

Update the pairs of field-value.

Params:

NameTypeAttributeDescription
pairs Object

updating target pairs

Private Methods

private _updateField(field: string, value: Any) source

Update field with value.

Params:

NameTypeAttributeDescription
field string

updating target

value Any

new value