summaryrefslogtreecommitdiff
path: root/lib/dojo/_base/window.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dojo/_base/window.js')
-rw-r--r--lib/dojo/_base/window.js49
1 files changed, 49 insertions, 0 deletions
diff --git a/lib/dojo/_base/window.js b/lib/dojo/_base/window.js
new file mode 100644
index 000000000..44239d92c
--- /dev/null
+++ b/lib/dojo/_base/window.js
@@ -0,0 +1,49 @@
+/*
+ Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo._base.window"]){
+dojo._hasResource["dojo._base.window"]=true;
+dojo.provide("dojo._base.window");
+dojo.doc=window["document"]||null;
+dojo.body=function(){
+return dojo.doc.body||dojo.doc.getElementsByTagName("body")[0];
+};
+dojo.setContext=function(_1,_2){
+dojo.global=_1;
+dojo.doc=_2;
+};
+dojo.withGlobal=function(_3,_4,_5,_6){
+var _7=dojo.global;
+try{
+dojo.global=_3;
+return dojo.withDoc.call(null,_3.document,_4,_5,_6);
+}
+finally{
+dojo.global=_7;
+}
+};
+dojo.withDoc=function(_8,_9,_a,_b){
+var _c=dojo.doc,_d=dojo._bodyLtr,_e=dojo.isQuirks;
+try{
+dojo.doc=_8;
+delete dojo._bodyLtr;
+dojo.isQuirks=dojo.doc.compatMode=="BackCompat";
+if(_a&&typeof _9=="string"){
+_9=_a[_9];
+}
+return _9.apply(_a,_b||[]);
+}
+finally{
+dojo.doc=_c;
+delete dojo._bodyLtr;
+if(_d!==undefined){
+dojo._bodyLtr=_d;
+}
+dojo.isQuirks=_e;
+}
+};
+}