From 04ec2002f542b2265681c9736307865c43cf0324 Mon Sep 17 00:00:00 2001 From: pangzhihao Date: Wed, 14 Dec 2016 18:51:22 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E8=AF=BB=E6=BA=90=E7=A0=81=E5=90=8E?= =?UTF-8?q?=E5=8F=91=E7=8E=B051=E8=A1=8Cbug,ie6/ie7=E4=B8=8B=E4=B9=9F?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E8=A1=A5=E9=BD=90=E6=B6=88=E6=81=AF=E5=89=8D?= =?UTF-8?q?=E7=BC=80=E6=89=8D=E8=83=BD=E6=AD=A3=E5=B8=B8=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=EF=BC=8C=E5=90=A6=E5=88=99=E4=B8=8E=E7=AC=AC90=E8=A1=8C?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=9F=9B=E7=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- messenger.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/messenger.js b/messenger.js index 55ec45a..a7b4bb5 100644 --- a/messenger.js +++ b/messenger.js @@ -48,7 +48,7 @@ window.Messenger = (function(){ Target.prototype.send = function(msg){ var targetFunc = window.navigator[this.prefix + this.name]; if ( typeof targetFunc == 'function' ) { - targetFunc(this.prefix + msg, window); + targetFunc(this.prefix + '|' + this.name + '__Messenger__' + msg, window); } else { throw new Error("target callback function is not defined"); } @@ -79,7 +79,7 @@ window.Messenger = (function(){ if(typeof msg == 'object' && msg.data){ msg = msg.data; } - + var msgPairs = msg.split('__Messenger__'); var msg = msgPairs[1]; var pairs = msgPairs[0].split('|');