new Instance()
- Source:
Methods
(static) bind(event, callbackopt, listenersConfigopt) → {string}
- Source:
returns listener Id
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
event |
string | function | event name of function with name |
|
callback |
function | module:ApplicationPrototype.Instance.BindListenerConfig |
<optional> |
function that will listen data |
listenersConfig |
module:ApplicationPrototype.Instance.BindListenerConfig | string |
<optional> |
of lis event name of function with name |
Returns:
- Type
- string
(static) crudEvents(context, publicMethods, privateMethods) → {module:ApplicationPrototype.Instance}
- Source:
returns listener Id
Parameters:
Name | Type | Description |
---|---|---|
context |
Object.<any> | will be used as a base for ApplicationPrototype instance that will be returned |
publicMethods |
Object.<function()> | list of public methods available from returned instance |
privateMethods |
Object.<function()> | list of private methods available only for instance's methods |
Returns:
(static) off(event, specifiedEventIdopt) → {boolean}
- Source:
remove all event listeners
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
event |
string | event or events names separated by comma |
|
specifiedEventId |
string |
<optional> |
event name of function with name |
Returns:
- Type
- boolean
(static) on(event, callbackopt, specifiedEventId) → {string}
- Source:
returns listener Id
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
event |
string | function | event name of function with name |
|
callback |
function |
<optional> |
function that will listen data |
specifiedEventId |
string | event name of function with name |
Returns:
- Type
- string
(static) once(event, callbackopt, specifiedEventId) → {string}
- Source:
returns listener Id
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
event |
string | function | event name of function with name |
|
callback |
function |
<optional> |
function that will listen data |
specifiedEventId |
string | event name of function with name |
Returns:
- Type
- string
(static) property(getter, setteropt, configopt)
- Source:
Parameters:
Name | Type | Attributes | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
getter |
module:ApplicationPrototype.PropertyHandler | function with name |
||||||||||||||||
setter |
module:ApplicationPrototype.PropertyHandler |
<optional> |
||||||||||||||||
config |
object |
<optional> |
Properties
|
(static) property(propertyName, getter, setteropt, configopt)
- Source:
Parameters:
Name | Type | Attributes | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
propertyName |
string | |||||||||||||||||
getter |
module:ApplicationPrototype.Instance.PropertyHandler | |||||||||||||||||
setter |
module:ApplicationPrototype.Instance.PropertyHandler |
<optional> |
||||||||||||||||
config |
object |
<optional> |
Properties
|
Fires:
- module:ApplicationPrototype.Instance.event:__onSet
- module:ApplicationPrototype.Instance.event:__onGet
- module:ApplicationPrototype.Instance.event:__afterGet
- module:ApplicationPrototype.Instance.event:__afterGet
- module:ApplicationPrototype.Instance.event:__onSet::propName
- module:ApplicationPrototype.Instance.event:__onGet::propName
- module:ApplicationPrototype.Instance.event:__afterGet::propName
- module:ApplicationPrototype.Instance.event:__afterGet::propName
Type Definitions
BindListenerConfig
- Source:
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
listenedBefore |
boolean |
<optional> |
true
|
allow listeners before method call |
listenedOn |
boolean |
<optional> |
true
|
allow listeners on method call ( is after ) |
listenedAfter |
boolean |
<optional> |
true
|
allow listeners after method call ( is after small delay ) |
allowInterruption |
boolean |
<optional> |
true
|
configuration for bind listeners
Type:
- object
PropertyHandler(value, lastValue, isSetter)
- Source:
returns listener Id
Parameters:
Name | Type | Description |
---|---|---|
value |
any | is undefined when |
lastValue |
any | |
isSetter |
boolean |
Events
__afterGet
- Source:
Properties:
Name | Type | Description |
---|---|---|
propName |
string | |
value |
any | |
lastValue |
any |
Type:
- object
__afterGet::propName
- Source:
Properties:
Name | Type | Description |
---|---|---|
value |
any | |
lastValue |
any |
Type:
- object
__afterSet
- Source:
Properties:
Name | Type | Description |
---|---|---|
propName |
string | |
value |
any | |
lastValue |
any |
Type:
- object
__afterSet::propName
- Source:
Properties:
Name | Type | Description |
---|---|---|
value |
any | |
lastValue |
any |
Type:
- object
__onGet
- Source:
Properties:
Name | Type | Description |
---|---|---|
propName |
string | |
value |
any | |
lastValue |
any |
Type:
- object
__onGet::propName
- Source:
Properties:
Name | Type | Description |
---|---|---|
value |
any | |
lastValue |
any |
Type:
- object
__onSet
- Source:
Properties:
Name | Type | Description |
---|---|---|
propName |
string | |
value |
any | |
lastValue |
any |
Type:
- object
__onSet::propName
- Source:
Properties:
Name | Type | Description |
---|---|---|
value |
any | |
lastValue |
any |
Type:
- object