I am working on a project where I would like to download the Ember.js application from another site hosted on a different server and using a different domain name. In other terms, I would like to enable the Ember application on another website, for example, I would do with an iFrame, but without an iFrame.
I built the Ember.js application using Yeoman and the Ember generator.
In the original website, I just have simple markup:
<body>
<h1>My website</h1>
<p>Lorem ipsum...</p>
<div id="myEmberApp"></div>
<p>Lorem ipsum...</p>
</body>
I know how to call an external JS file, but I don’t know how to execute or download the Ember.js application from here. I also tried with CORS, but I don't think this will suit my needs.
For recordings, I cannot use iFrame. On the source website, I don't want to have any dependencies on jQuery or anything else. In the future, I would like to offer a step-by-step guide on how to integrate this application into any websites.
Is there any solution? Or do I need to plan to make my application in full JS without Ember.js?
Let me know if you need more information.
Thanks in advance
--- Edit ---
This is how I call my JS file from the origin site:
<script>
(function () {
var eh = document.createElement('script');
eh.type = 'text/javascript';
eh.async = true;
eh.src = '//localhost:9000/scripts/edenhome.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(eh, s)
})();
</script>
Hope this helps.
source
share