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; ...@@ -9,21 +9,21 @@ const Penpal = require('penpal').default;
* @returns {*} * @returns {*}
*/ */
function setupViamAPI(divId, methods, iframeUrl, apiUrl) { function setupViamAPI(divId, methods, iframeUrl, apiUrl) {
if (!apiUrl) { if (!apiUrl) {
return Promise.reject('API Host not specified.') return Promise.reject('API Host not specified.');
} }
const connection = Penpal.connectToChild({ const connection = Penpal.connectToChild({
// URL of page to load into iframe. // URL of page to load into iframe.
url: iframeUrl, url: iframeUrl,
// Container to which the iframe should be appended. // Container to which the iframe should be appended.
appendTo: document.getElementById(divId), appendTo: document.getElementById(divId),
// Methods parent is exposing to child // Methods parent is exposing to child
methods methods
}); });
return connection.promise return connection.promise
.then((child) => child.initializeApiHost(apiUrl).then(() => child)) .then((child) => child.initializeApiHost(apiUrl).then(() => child));
} }
window.setupViamAPI = setupViamAPI; window.setupViamAPI = setupViamAPI;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment