Author: chabotc
Date: Sat May 17 15:42:48 2008
New Revision: 657469

URL: http://svn.apache.org/viewvc?rev=657469&view=rev
Log:
Fixes  window.postMessage to work with FF3rc1

Modified:
    incubator/shindig/trunk/features/rpc/rpc.js

Modified: incubator/shindig/trunk/features/rpc/rpc.js
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/features/rpc/rpc.js?rev=657469&r1=657468&r2=657469&view=diff
==============================================================================
--- incubator/shindig/trunk/features/rpc/rpc.js (original)
+++ incubator/shindig/trunk/features/rpc/rpc.js Sat May 17 15:42:48 2008
@@ -45,7 +45,7 @@
                      typeof window.postMessage === 'function' ? 'wpm' :
                      'ifpc';
   if (relayChannel === 'dpm' || relayChannel === 'wpm') {
-    document.addEventListener('message', function(packet) {
+    window.addEventListener('message', function(packet) {
       // TODO validate packet.domain for security reasons
       process(gadgets.json.parse(packet.data));
     }, false);
@@ -299,7 +299,7 @@
         break;
       case 'wpm': // use window.postMessage
         var targetWin = targetId === '..' ? parent : frames[targetId];
-        targetWin.postMessage(rpcData);
+        targetWin.postMessage(rpcData, "*");
         break;
       default: // use 'ifpc' as a fallback mechanism
         var relay = gadgets.rpc.getRelayUrl(targetId);


Reply via email to