Constructor Summary
Public Constructor | ||
public |
Create a Core. |
Method Summary
Public Methods | ||
public |
Add handler or listener for saying message |
|
public |
Cast a message to the listeners |
|
public |
unescapeHtml(escaped: String): String Unescape HTML |
|
public |
unlistened(name: string, -: Function) Remove handler or listener |
Private Methods | ||
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 Methods
public listened(nameOrObj: string | Object, handler: Function) source
Add handler or listener for saying message
Example:
core.listened('*', function(){});
core.listened('evtName1', function(){});
core.listened({ evtName2: function(){}, evtName3: function(){} })
public say(name: string, ctx: *) source
Cast a message to the listeners
Params:
Name | Type | Attribute | Description |
name | string | message name |
|
ctx | * | passing value |
public unescapeHtml(escaped: String): String source
Unescape HTML
Params:
Name | Type | Attribute | Description |
escaped | String | HTML string |
Private Methods
private _callR(args: *, target: *, method: *, methodOwner: *) source
Params:
Name | Type | Attribute | Description |
args | * | ||
target | * | ||
method | * | ||
methodOwner | * |
private _listened(name: *, handler: *) source
Params:
Name | Type | Attribute | Description |
name | * | ||
handler | * |
private _privates(): {"_F_obs": *} source
Return non-enumerable attribute definitions.
Return:
{"_F_obs": *} |
private _say(targetName: *, name: *, ctx: *) source
Params:
Name | Type | Attribute | Description |
targetName | * | ||
name | * | ||
ctx | * |