Skip to content
Snippets Groups Projects

Use webpack for bundling JS libs and move Golang code related to Iframe generation there

Merged Igor Markin requested to merge feature-vcl-webpack-bundle into master
Compare and
16 files
+ 7708
102
Compare changes
  • Side-by-side
  • Inline
Files
16
+ 17
0
const Penpal = require('penpal').default;
function setupViamAPI(divId, methodsArg, url) {
const connection = Penpal.connectToChild({
// URL of page to load into iframe.
url,
// Container to which the iframe should be appended.
appendTo: document.getElementById(divId),
// Methods parent is exposing to child
methods: methodsArg
});
return connection.promise
}
window.setupViamAPI = setupViamAPI;
Loading