root / trunk / web / dojo / dojox / io / xhrScriptPlugin.js @ 13
History | View | Annotate | Download (828 Bytes)
| 1 | 9 | andrej.cim | /*
|
|---|---|---|---|
| 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.xhrScriptPlugin"]){ |
||
| 9 | dojo._hasResource["dojox.io.xhrScriptPlugin"]=true; |
||
| 10 | dojo.provide("dojox.io.xhrScriptPlugin");
|
||
| 11 | dojo.require("dojox.io.xhrPlugins");
|
||
| 12 | dojo.require("dojo.io.script");
|
||
| 13 | dojo.require("dojox.io.scriptFrame");
|
||
| 14 | dojox.io.xhrScriptPlugin=function(_1,_2,_3){ |
||
| 15 | dojox.io.xhrPlugins.register("script",function(_4,_5){ |
||
| 16 | return _5.sync!==true&&(_4=="GET"||_3)&&(_5.url.substring(0,_1.length)==_1); |
||
| 17 | },function(_6,_7,_8){
|
||
| 18 | var _9=function(){ |
||
| 19 | _7.callbackParamName=_2; |
||
| 20 | if(dojo.body()){
|
||
| 21 | _7.frameDoc="frame"+Math.random();
|
||
| 22 | } |
||
| 23 | return dojo.io.script.get(_7);
|
||
| 24 | }; |
||
| 25 | return (_3?_3(_9,true):_9)(_6,_7,_8); |
||
| 26 | }); |
||
| 27 | }; |
||
| 28 | } |