Project

General

Profile

Statistics
| Revision:

root / trunk / web / dojo / dojox / io / scriptFrame.js @ 11

History | View | Annotate | Download (1.27 KB)

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.io.scriptFrame"]){
9
dojo._hasResource["dojox.io.scriptFrame"]=true;
10
dojo.provide("dojox.io.scriptFrame");
11
dojo.require("dojo.io.script");
12
dojo.require("dojo.io.iframe");
13
(function(){
14
var _1=dojo.io.script;
15
dojox.io.scriptFrame={_waiters:{},_loadedIds:{},_getWaiters:function(_2){
16
return this._waiters[_2]||(this._waiters[_2]=[]);
17
},_fixAttachUrl:function(_3){
18
},_loaded:function(_4){
19
var _5=this._getWaiters(_4);
20
this._loadedIds[_4]=true;
21
this._waiters[_4]=null;
22
for(var i=0;i<_5.length;i++){
23
var _6=_5[i];
24
_6.frameDoc=dojo.io.iframe.doc(dojo.byId(_4));
25
_1.attach(_6.id,_6.url,_6.frameDoc);
26
}
27
}};
28
var _7=_1._canAttach;
29
var _8=dojox.io.scriptFrame;
30
_1._canAttach=function(_9){
31
var _a=_9.args.frameDoc;
32
if(_a&&dojo.isString(_a)){
33
var _b=dojo.byId(_a);
34
var _c=_8._getWaiters(_a);
35
if(!_b){
36
_c.push(_9);
37
dojo.io.iframe.create(_a,dojox._scopeName+".io.scriptFrame._loaded('"+_a+"');");
38
}else{
39
if(_8._loadedIds[_a]){
40
_9.frameDoc=dojo.io.iframe.doc(_b);
41
this.attach(_9.id,_9.url,_9.frameDoc);
42
}else{
43
_c.push(_9);
44
}
45
}
46
return false;
47
}else{
48
return _7.apply(this,arguments);
49
}
50
};
51
})();
52
}