Uploaded image for project: 'Shindig'
  1. Shindig
  2. SHINDIG-1553

Shindig's RPC mechanism assumes that the container page and container script exist within the same window

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.0.2
    • 2.5.3
    • Javascript

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ssievers Stanton Sievers
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: