Project

General

Profile

Download (947 Bytes) Statistics
| Branch: | Revision:
1
/*
2
	Copyright (c) 2004-2008, 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["dojo.AdapterRegistry"]){
9
dojo._hasResource["dojo.AdapterRegistry"]=true;
10
dojo.provide("dojo.AdapterRegistry");
11
dojo.AdapterRegistry=function(_1){
12
this.pairs=[];
13
this.returnWrappers=_1||false;
14
};
15
dojo.extend(dojo.AdapterRegistry,{register:function(_2,_3,_4,_5,_6){
16
this.pairs[((_6)?"unshift":"push")]([_2,_3,_4,_5]);
17
},match:function(){
18
for(var i=0;i<this.pairs.length;i++){
19
var _8=this.pairs[i];
20
if(_8[1].apply(this,arguments)){
21
if((_8[3])||(this.returnWrappers)){
22
return _8[2];
23
}else{
24
return _8[2].apply(this,arguments);
25
}
26
}
27
}
28
throw new Error("No match found");
29
},unregister:function(_9){
30
for(var i=0;i<this.pairs.length;i++){
31
var _b=this.pairs[i];
32
if(_b[0]==_9){
33
this.pairs.splice(i,1);
34
return true;
35
}
36
}
37
return false;
38
}});
39
}
(1-1/26)