CEP Concept: Access CEP JavaScript Engine from external Website/ Cross Origin
I'm experimenting with a CEP 6 Extension and stumbled about a general Design question which I would like to discuss here:
## Setup
My basic idea is to provide the Frontend of the Extension from a CMS-System which is already in place and would only need to add a few buttons to work together with the future InDesign CEP Extension. In this frontend the user can pick items with a given ID, this ID is sent to CEP JavaScript Controller which handles JSX in InDesign and can talk to a REST-APi to get additional content.
## Idea/Concept
For the panel I load an index.html with the controller JS Code, the Frontend is loaded via <object>.
<!doctype html>
<html lang="en">
<head>
<script src="js/main.js"></script>
</head>
<body>
<div>
<object type="text/html" data="http://external.link.com">
</object>
</div>
</body>
</html>
In the main.js there is a test() Function. The external site can call this function via <button onclick="parent.test();">test</button>
This works. And I could start now...
## Questions
- Is this the way to go to communicate via external Websites/Frontends and the CEP JS Engine? Are there alternatives to this approach?
- In my opinion this is a cross-origin frame and JS-Code should be disabled. Is it enabled on purpose?
Any idea, hint and help is greatly appreciated.

