Viewer API access via iframe

In the past using Document.domain property allowed API access between two subdomains of the same domain, however the property is now deprecated.

As the above MDN page suggests, Window.postMessage can be used instead for cross-origin communication. You can find an example in Configurator Commands - #10 by jan.