You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by sc...@apache.org on 2012/07/13 09:39:13 UTC

svn commit: r1361067 - /incubator/wookie/trunk/WebContent/shared/js/wookie-wrapper.js

Author: scottbw
Date: Fri Jul 13 07:39:12 2012
New Revision: 1361067

URL: http://svn.apache.org/viewvc?rev=1361067&view=rev
Log:
Handle errors when dispatching storage events to child frames - see WOOKIE-359

Modified:
    incubator/wookie/trunk/WebContent/shared/js/wookie-wrapper.js

Modified: incubator/wookie/trunk/WebContent/shared/js/wookie-wrapper.js
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/WebContent/shared/js/wookie-wrapper.js?rev=1361067&r1=1361066&r2=1361067&view=diff
==============================================================================
--- incubator/wookie/trunk/WebContent/shared/js/wookie-wrapper.js (original)
+++ incubator/wookie/trunk/WebContent/shared/js/wookie-wrapper.js Fri Jul 13 07:39:12 2012
@@ -225,11 +225,17 @@ var WidgetPreferences = new function Wid
         //
         var frames = window.frames;
         for (var i=0;i<frames.length;i++){
+          try{
             if(document.createEvent){
                frames[i].dispatchEvent(evt);  
             } else { // IE before v 9
                frames[i].fireEvent("storage", evt);
             }  
+          } catch(err) {
+            if (typeof console != "undefined") { 
+                console.warn("error dispatching storage event to child frame; most likely this is due to same-origin restrictions");
+            }
+          }
         }   
     }
 };