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:
Alex A. Naanou 2016-12-30 03:19:12 +03:00
parent e9df17667b
commit b34d227858
2 changed files with 16 additions and 1 deletions

View File

@ -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){

View File

@ -1,6 +1,6 @@
{
"name": "ig-actions",
"version": "1.8.0",
"version": "1.9.0",
"description": "",
"main": "actions.js",
"scripts": {