;(function() { var messagingIframe, bridge = 'sdk', CUSTOM_PROTOCOL_SCHEME = 'jscall'; var appId = '%@' ,deviceId='%@'; if (window[bridge]) { return } // 创建隐藏的iframe function _createQueueReadyIframe(doc) { messagingIframe = doc.createElement('iframe'); messagingIframe.style.display = 'none'; doc.documentElement.appendChild(messagingIframe); } window[bridge] = {}; window[bridge]['getAppId']=function getAppId(){ //alert('appid='+appId); return appId; }; window[bridge]['getDeviceId']=function getDeviceId(){ return deviceId; }; window[bridge]['closeWin'] = function closeWin(uid,nick,sessionKey){ document.location=CUSTOM_PROTOCOL_SCHEME + ':' + arguments.callee.name + ':' + encodeURIComponent(JSON.stringify(arguments)); }; //var methods = ["closeWin(uid,nick,sessionKey)"]; //var methodsWithoutParam =["closeWin"]; //for (var i=0;i