mirror of
https://github.com/flynx/features.js.git
synced 2025-10-29 18:30:11 +00:00
working on docs..
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
9c74ae7a32
commit
ed08ed83cd
18
README.md
18
README.md
@ -117,16 +117,18 @@ Root Action o---|---x
|
|||||||
- a method, created by `Action(..)`,
|
- a method, created by `Action(..)`,
|
||||||
- calls all the shadowed/overloaded actions in the inheritance
|
- calls all the shadowed/overloaded actions in the inheritance
|
||||||
chain in sequence implicitly,
|
chain in sequence implicitly,
|
||||||
NOTE: there is no way to prevent an action in the chain from
|
**Notes:**
|
||||||
running, this is by design, i.e. no way to fully shadow.
|
- there is no way to prevent an action in the chain from
|
||||||
|
running, this is by design, i.e. no way to fully shadow.
|
||||||
- actions that do not shadow anything are called root actions.
|
- actions that do not shadow anything are called root actions.
|
||||||
- returns the action set by default (for call chaining),
|
- returns the action set by default (for call chaining),
|
||||||
- the base/root action can return any value.
|
- the base/root action can return any value.
|
||||||
NOTE: if undefined is returned, it will be replaced by the
|
**Notes:**
|
||||||
action context/action set.
|
- if undefined is returned, it will be replaced by the
|
||||||
NOTE: there is no distinction between root and other actions
|
action context/action set.
|
||||||
other than that root action's return values are not
|
- there is no distinction between root and other actions
|
||||||
ignored.
|
other than that root action's return values are not
|
||||||
|
ignored.
|
||||||
- can consist of two parts: the first is called before the
|
- can consist of two parts: the first is called before the
|
||||||
shadowed action (pre-callback) and the second after (post-callback).
|
shadowed action (pre-callback) and the second after (post-callback).
|
||||||
- post-callback has access to the return value and can modify it
|
- post-callback has access to the return value and can modify it
|
||||||
@ -187,7 +189,7 @@ Root Action o---|---x
|
|||||||
This replaces / complements the standard JavaScript overloading
|
This replaces / complements the standard JavaScript overloading
|
||||||
mechanisms (`Action`, `Actions`)
|
mechanisms (`Action`, `Actions`)
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
// Actions...
|
// Actions...
|
||||||
var X = Actions({
|
var X = Actions({
|
||||||
m: [function(){ console.log('m') }]
|
m: [function(){ console.log('m') }]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user