EmbeddedXopus.getAPI
getAPI() can be used to gain access to the Xopus API from outside an <iframe>, without using event listeners. It requires the frame to have a name attribute defined, which is supplied as the only argument of this method.
<script src="/xopus/embedded.js"></script>
<script>
function load(uri) {
EmbeddedXopus.getAPI('xopus').Editor.loadDocument(uri);
}
</script>
<iframe src="/xopus/xopus.html#/start.html" name="xopus"></iframe>
<button onclick="load('a.xml')">a.xml</button>
- Documentation
- › API
- › Global objects API
- › EmbeddedXopus.getAPI
EmbeddedXopus.getAPI( windowName : String) : Editor
: String) : EditorArguments
- windowName
- String. The name of the Xopus
<iframe>window.