* TODO postMessage
*/
-X.Net.JSONP = {
- cb : function( accessKey, jsonString, time, opt_json2FileSize ){
+X[ 'Net' ][ 'JSONP' ] = {
+ 'cb' : function( accessKey, jsonString, time, opt_json2FileSize ){
if( accessKey !== X_NET_JSONP_ACCESS_KEY || !X_NET_JSONPWrapper._busy ) return;
X_NET_JSONPWrapper._busy = false;
json2FileSize = 18103,
html;
- X_NET_JSONP_NinjaIframe || ( X_NET_JSONP_NinjaIframe = new X.Util.NinjaIframe() );
+ X_NET_JSONP_NinjaIframe || ( X_NET_JSONP_NinjaIframe = X[ 'Util' ][ 'NinjaIframe' ]() );
// TODO '<scr'+'ipt> 化 恐らくアンチウイルスソフトが反応しないための対策
// TODO postMessage の利用
};
X_NET_JSONP_NinjaIframe
- .refresh( html.join( '' ) )
+ [ 'refresh' ]( html.join( '' ) )
[ 'listen' ]( [ X_EVENT_SUCCESS, X_EVENT_ERROR ], X_NET_JSONPWrapper, X_NET_JSONP_iframeListener );
};
function X_NET_JSONP_iframeListener( e ){
switch( e.type ){
case X_EVENT_SUCCESS :
- console.log( 'iframe onload, but' );
+ console.log( 'iframe onload, but ' + X_NET_JSONPWrapper._onloadCount + ' < ' + X_Net_JSONP_onloadCount );
if( ++X_NET_JSONPWrapper._onloadCount < X_Net_JSONP_onloadCount ) return;
// TODO callback が無ければ error
X_NET_JSONPWrapper[ 'asyncDispatch' ]( 1000, X_EVENT_ERROR );