You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by jo...@gmail.com on 2010/01/29 20:39:43 UTC

Fix gadgets.rpc on IE8 (issue194141)

Reviewers: shindig.remailer_gmail.com,

Description:
On IE8, typeof window.postMessage === "object". As such, getTransport()
returns NIX for IE8, which doesn't work (by design). window.postMessage
should be chosen instead.

Please review this at http://codereview.appspot.com/194141/show

Affected files:
   features/src/main/javascript/features/rpc/rpc.js


Index: features/src/main/javascript/features/rpc/rpc.js
===================================================================
--- features/src/main/javascript/features/rpc/rpc.js	(revision 904586)
+++ features/src/main/javascript/features/rpc/rpc.js	(working copy)
@@ -170,7 +170,7 @@
     * @member gadgets.rpc
     */
    function getTransport() {
-    return typeof window.postMessage === 'function' ? gadgets.rpctx.wpm :
+    return typeof window.postMessage !== 'undefined' ? gadgets.rpctx.wpm :
             typeof window.postMessage === 'object' ? gadgets.rpctx.wpm :
             window.ActiveXObject ? gadgets.rpctx.nix :
             navigator.userAgent.indexOf('WebKit') > 0 ? gadgets.rpctx.rmr :