Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
Vereign Client Library
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Code
Vereign Client Library
Commits
39b914bd
Commit
39b914bd
authored
6 years ago
by
Markin Igor
Browse files
Options
Downloads
Patches
Plain Diff
Fix intendation for client.
parent
3e207bba
No related branches found
No related tags found
1 merge request
!7
Set up libraries building as static files
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
javascript/src/viamapi-client.js
+13
-13
13 additions, 13 deletions
javascript/src/viamapi-client.js
with
13 additions
and
13 deletions
javascript/src/viamapi-client.js
+
13
−
13
View file @
39b914bd
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment