OSDN Git Service

Version 0.6.160, fix X.Net.
[pettanr/clientJs.git] / 0.6.x / js / 06_net / 02_XNetJSONP.js
index 2c259c5..3fbcf77 100644 (file)
@@ -33,8 +33,8 @@ X[ 'Net' ][ 'JSONP' ] = {
                        
                        X_NET_JSONPWrapper
                                [ 'asyncDispatch' ]( {
-                                       type : jsonString ? X_EVENT_SUCCESS : X_EVENT_ERROR,
-                                       data : X_String_parseTrustedJsonString( jsonString )
+                                       type     : jsonString ? X_EVENT_SUCCESS : X_EVENT_ERROR,
+                                       response : X_String_parseTrustedJsonString( jsonString )
                                } );
                        
                        X_Net_JSONP_errorTimerID && X_Timer_remove( X_Net_JSONP_errorTimerID );
@@ -104,17 +104,11 @@ X_TEMP.X_NET_JSONP_params = {
                                } else
                                if( X_UA[ 'IE8' ] ){
                                        html = [
-                                               // JavaScriptでunicode文字列をunescapeする
-                                               // http://perutago.seesaa.net/article/202801583.html
-                                               
-                                               // http://blog.livedoor.jp/dankogai/archives/51503830.html              
-                                               // Ajax - IE8にもJSON入ってます。使えるとは限らないけど
-                                               // Compatibility mode (別名Quirks mode) では、JSONオブジェクトは無効になります。iframeもだめです
                                                '<script', charset, ' id="jp"></script>',
                                                '<script>',
                                                        'onunload=function(){clearTimeout(id)};',
                                                        'nw=0;', // なぜか必要,,,
-                                                       'function ', callback, '(o){nw-=+new Date;parent.X.Net.JSONP.cb(' + X_NET_JSONP_ACCESS_KEY + ',parent.JSON.stringify(o).replace(/\\\\u([a-fA-F0-9]{4})/g,function(a,b){return String.fromCharCode(parseInt(b,16))}),-nw)}',
+                                                       'function ', callback, '(o){nw-=+new Date;parent.X.Net.JSONP.cb(' + X_NET_JSONP_ACCESS_KEY + ',parent.X.JSON.stringify(o),-nw)}',
                                                        //'function ', callback, '(o){if(nw){nw-=+new Date;postMessage("', X_NET_JSONP_SEND_MSG_KEY,' "+nw+"|"+parent.JSON.stringify(o).replace(/\\\\u([a-fA-F0-9]{4})/g,function(a,b){return String.fromCharCode(parseInt(b,16))}),"*");nw=0}}',                       
                                                        'function tm(){jp.src="', url ,'";nw=+new Date}',
                                                        'id=setTimeout(tm,16);',