DescriptionJIRA: https://issues.apache.org/jira/browse/SHINDIG-1533
This is a fix/workaround for an issue I've encountered in init.js#initializeGlobalVars() when dynamically loading the container.js.
The code as it exists today assumes that the <script> tag loading the container.js will be the last one encountered for the document. This is not always the case, especially when loading the container.js by dynamically inserting the <script> tag in the page.
If the wrong script tag is used, the __API_URI and __CONTAINER_URI globals will not initialize properly.
My fix is to introduce another window global that can be set before dynamically loading the container.js. This new global will unambiguously specify the proper script tag by providing the ID.
I'm also interested to hear of other solutions. Until coming up with this solution I had just been overriding the improperly init'd globals before doing anything with the Common Container. This seems fragile as more globals could be added in the future or used at unexpected times.
Patch Set 1 : #
MessagesTotal messages: 7
|