Project

General

Profile

Statistics
| Revision:

root / trunk / web / dojo / dojox / lang / aspect / cflow.js @ 12

History | View | Annotate | Download (793 Bytes)

1
/*
2
        Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
3
        Available via Academic Free License >= 2.1 OR the modified BSD license.
4
        see: http://dojotoolkit.org/license for details
5
*/
6

    
7

    
8
if(!dojo._hasResource["dojox.lang.aspect.cflow"]){
9
dojo._hasResource["dojox.lang.aspect.cflow"]=true;
10
dojo.provide("dojox.lang.aspect.cflow");
11
(function(){
12
var _1=dojox.lang.aspect;
13
_1.cflow=function(_2,_3){
14
if(arguments.length>1&&!(_3 instanceof Array)){
15
_3=[_3];
16
}
17
var _4=_1.getContextStack();
18
for(var i=_4.length-1;i>=0;--i){
19
var c=_4[i];
20
if(_2&&c.instance!=_2){
21
continue;
22
}
23
if(!_3){
24
return true;
25
}
26
var n=c.joinPoint.targetName;
27
for(var j=_3.length-1;j>=0;--j){
28
var m=_3[j];
29
if(m instanceof RegExp){
30
if(m.test(n)){
31
return true;
32
}
33
}else{
34
if(n==m){
35
return true;
36
}
37
}
38
}
39
}
40
return false;
41
};
42
})();
43
}