Skip to content
Snippets Groups Projects
Commit 39b914bd authored by Markin Igor's avatar Markin Igor
Browse files

Fix intendation for client.

parent 3e207bba
No related branches found
No related tags found
1 merge request!7Set up libraries building as static files
......@@ -9,21 +9,21 @@ const Penpal = require('penpal').default;
* @returns {*}
*/
function setupViamAPI(divId, methods, iframeUrl, apiUrl) {
if (!apiUrl) {
return Promise.reject('API Host not specified.')
}
if (!apiUrl) {
return Promise.reject('API Host not specified.');
}
const connection = Penpal.connectToChild({
// URL of page to load into iframe.
url: iframeUrl,
// Container to which the iframe should be appended.
appendTo: document.getElementById(divId),
// Methods parent is exposing to child
methods
});
const connection = Penpal.connectToChild({
// URL of page to load into iframe.
url: iframeUrl,
// Container to which the iframe should be appended.
appendTo: document.getElementById(divId),
// Methods parent is exposing to child
methods
});
return connection.promise
.then((child) => child.initializeApiHost(apiUrl).then(() => child))
return connection.promise
.then((child) => child.initializeApiHost(apiUrl).then(() => child));
}
window.setupViamAPI = setupViamAPI;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment