You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by dd...@apache.org on 2013/01/09 15:52:52 UTC
svn commit: r1430874 -
/shindig/trunk/features/src/main/javascript/features/rpc/rpc.js
Author: ddumont
Date: Wed Jan 9 14:52:52 2013
New Revision: 1430874
URL: http://svn.apache.org/viewvc?rev=1430874&view=rev
Log:
Make the rpc search for target frames a bit more resilient.
Modified:
shindig/trunk/features/src/main/javascript/features/rpc/rpc.js
Modified: shindig/trunk/features/src/main/javascript/features/rpc/rpc.js
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/rpc/rpc.js?rev=1430874&r1=1430873&r2=1430874&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/rpc/rpc.js (original)
+++ shindig/trunk/features/src/main/javascript/features/rpc/rpc.js Wed Jan 9 14:52:52 2013
@@ -439,7 +439,14 @@ if (!window['gadgets']['rpc']) { // make
var siblingId = parseSiblingId(id);
if (siblingId) {
- return window.frames[siblingId.id];
+ var currentWindow = window;
+ while (!currentWindow.frames[siblingId.id]) {
+ if (currentWindow === window.top) {
+ break;
+ }
+ currentWindow = currentWindow.parent;
+ }
+ return currentWindow.frames[siblingId.id];
}
// Cast to a String to avoid an index lookup.