]>
git.wh0rd.org - tt-rss.git/blob - lib/dojo/AdapterRegistry.js
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
8 if(!dojo
._hasResource
["dojo.AdapterRegistry"]){
9 dojo
._hasResource
["dojo.AdapterRegistry"]=true;
10 dojo
.provide("dojo.AdapterRegistry");
11 dojo
.AdapterRegistry=function(_1
){
13 this.returnWrappers
=_1
||false;
15 dojo
.extend(dojo
.AdapterRegistry
,{register:function(_2
,_3
,_4
,_5
,_6
){
16 this.pairs
[((_6
)?"unshift":"push")]([_2
,_3
,_4
,_5
]);
18 for(var i
=0;i
<this.pairs
.length
;i
++){
20 if(_7
[1].apply(this,arguments
)){
21 if((_7
[3])||(this.returnWrappers
)){
24 return _7
[2].apply(this,arguments
);
28 throw new Error("No match found");
29 },unregister:function(_8
){
30 for(var i
=0;i
<this.pairs
.length
;i
++){
33 this.pairs
.splice(i
,1);