root / trunk / web / dojo / dojox / analytics / plugins / window.js @ 12
History | View | Annotate | Download (975 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.analytics.plugins.window"]){ |
9 |
dojo._hasResource["dojox.analytics.plugins.window"]=true; |
10 |
dojo.require("dojox.analytics._base");
|
11 |
dojo.provide("dojox.analytics.plugins.window");
|
12 |
dojox.analytics.plugins.window=new (function(){ |
13 |
this.addData=dojo.hitch(dojox.analytics,"addData","window"); |
14 |
this.windowConnects=dojo.config["windowConnects"]||["open","onerror"]; |
15 |
for(var i=0;i<this.windowConnects.length;i++){ |
16 |
dojo.connect(window,this.windowConnects[i],dojo.hitch(this,"addData",this.windowConnects[i])); |
17 |
} |
18 |
dojo.addOnLoad(dojo.hitch(this,function(){ |
19 |
var _1={};
|
20 |
for(var i in window){ |
21 |
if(dojo.isObject(window[i])){
|
22 |
switch(i){
|
23 |
case "location": |
24 |
case "console": |
25 |
_1[i]=window[i]; |
26 |
break;
|
27 |
default:
|
28 |
break;
|
29 |
} |
30 |
}else{
|
31 |
_1[i]=window[i]; |
32 |
} |
33 |
} |
34 |
this.addData(_1);
|
35 |
})); |
36 |
})(); |
37 |
} |