mirror of
https://github.com/flynx/actions.js.git
synced 2025-10-28 18:00:11 +00:00
added .getAttr(..) to search for action attributes in action chains...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
e9df17667b
commit
b34d227858
15
actions.js
15
actions.js
@ -601,6 +601,21 @@ module.MetaActions = {
|
||||
return this.actions.length
|
||||
},
|
||||
|
||||
// Get action attribute...
|
||||
//
|
||||
getAttr: function(action, attr){
|
||||
var cur = this
|
||||
|
||||
// go up the proto chain...
|
||||
while(cur.__proto__ != null){
|
||||
//if(cur[action] != null && attr in cur[action]){
|
||||
if(cur[action] != null && cur[action][attr] !== undefined){
|
||||
return cur[action][attr]
|
||||
}
|
||||
cur = cur.__proto__
|
||||
}
|
||||
},
|
||||
|
||||
// Get action documentation...
|
||||
//
|
||||
getDoc: function(actions){
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ig-actions",
|
||||
"version": "1.8.0",
|
||||
"version": "1.9.0",
|
||||
"description": "",
|
||||
"main": "actions.js",
|
||||
"scripts": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user