mirror of
https://github.com/flynx/actions.js.git
synced 2025-10-28 18:00:11 +00:00
cleaning out some legacy...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
b01052ead0
commit
68703056fb
12
actions.js
12
actions.js
@ -13,8 +13,6 @@ var object = require('ig-object')
|
|||||||
|
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
|
|
||||||
var args2array = function(a){ return [].slice.call(a) }
|
|
||||||
|
|
||||||
var ASIS =
|
var ASIS =
|
||||||
module.ASIS =
|
module.ASIS =
|
||||||
object.Constructor('ASIS', {
|
object.Constructor('ASIS', {
|
||||||
@ -366,7 +364,7 @@ var doWithRootAction =
|
|||||||
module.doWithRootAction =
|
module.doWithRootAction =
|
||||||
function(func){
|
function(func){
|
||||||
return function(){
|
return function(){
|
||||||
var args = args2array(arguments)
|
var args = [...arguments]
|
||||||
var handlers = (this.getHandlerList
|
var handlers = (this.getHandlerList
|
||||||
|| MetaActions.getHandlerList)
|
|| MetaActions.getHandlerList)
|
||||||
.apply(this, args)
|
.apply(this, args)
|
||||||
@ -989,7 +987,7 @@ Action.prototype.chainApply = function(context, inner, args){
|
|||||||
return this.post(context, data)
|
return this.post(context, data)
|
||||||
}
|
}
|
||||||
Action.prototype.chainCall = function(context, inner){
|
Action.prototype.chainCall = function(context, inner){
|
||||||
return this.chainApply(context, inner, args2array(arguments).slice(2))
|
return this.chainApply(context, inner, [...arguments].slice(2))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1286,7 +1284,7 @@ module.MetaActions = {
|
|||||||
var res = {}
|
var res = {}
|
||||||
var that = this
|
var that = this
|
||||||
actions = actions == null ? this.actions
|
actions = actions == null ? this.actions
|
||||||
: arguments.length > 1 ? args2array(arguments)
|
: arguments.length > 1 ? [...arguments]
|
||||||
: typeof(actions) == typeof('str') ? [actions]
|
: typeof(actions) == typeof('str') ? [actions]
|
||||||
: actions
|
: actions
|
||||||
|
|
||||||
@ -1310,7 +1308,7 @@ module.MetaActions = {
|
|||||||
var res = {}
|
var res = {}
|
||||||
var that = this
|
var that = this
|
||||||
actions = actions == null ? this.actions
|
actions = actions == null ? this.actions
|
||||||
: arguments.length > 1 ? args2array(arguments)
|
: arguments.length > 1 ? [...arguments]
|
||||||
: typeof(actions) == typeof('str') ? [actions]
|
: typeof(actions) == typeof('str') ? [actions]
|
||||||
: actions
|
: actions
|
||||||
|
|
||||||
@ -1819,7 +1817,7 @@ module.MetaActions = {
|
|||||||
chainApply: function(outer, inner, args){
|
chainApply: function(outer, inner, args){
|
||||||
return this[outer].chainApply(this, inner, args) },
|
return this[outer].chainApply(this, inner, args) },
|
||||||
chainCall: function(outer, inner){
|
chainCall: function(outer, inner){
|
||||||
return this[outer].chainApply(this, inner, args2array(arguments).slice(2)) },
|
return this[outer].chainApply(this, inner, [...arguments].slice(2)) },
|
||||||
|
|
||||||
|
|
||||||
// Call action handlers serted by .sortedActionPriority...
|
// Call action handlers serted by .sortedActionPriority...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user