You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shindig.apache.org by "Stanton Sievers (JIRA)" <ji...@apache.org> on 2011/06/28 20:54:17 UTC
[jira] [Created] (SHINDIG-1553) Shindig's RPC mechanism assumes
that the container page and container script exist within the same window
Shindig's RPC mechanism assumes that the container page and container script exist within the same window
---------------------------------------------------------------------------------------------------------
Key: SHINDIG-1553
URL: https://issues.apache.org/jira/browse/SHINDIG-1553
Project: Shindig
Issue Type: Bug
Components: Javascript
Affects Versions: 2.0.2
Reporter: Stanton Sievers
Fix For: 3.0.0
The primary use case that this bug precludes is one in which the container.js script (and subsequently rpc.js) are loaded in a separate frame than the main content page, i.e., the page that contains the gadget iframes.
Imagine a main page consisting of a frameset with two frames: ContentFrame and ScriptFrame. ScriptFrame loads the container JavaScript. It includes the script tag whose src equals "http://<myserver>/gadgets/js/container:rpc.js". ContentFrame references the global namespaces in ScriptFrame (gadgets and osapi) to instantiate an osapi.container.Container object. The page then creates a GadgetSite giving it a div that exists within ContentFrame. Then navigateGadget is called on the container.
The use case above will break outright because rpc.js makes the assumption that the ScriptFrame and ContentFrame are one and the same. For instance, in rpc.js, setupChildIframe() uses document.getElementById() which fails because that script is being executed in a ScriptFrame instead of ContentFrame where the iframe resides.
One solution would be to enable the rpc.js to load in a separate frame by introducing a "context" object that can be set. This would be similar to what dojo.setContext accomplishes. However, this solution would still require some prototyping to see if it's feasible.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira